move flag parsing to app.go

This commit is contained in:
2026-06-02 18:00:24 +00:00
parent 0082f2f3e5
commit f40638598d
2 changed files with 6 additions and 5 deletions
+5 -1
View File
@@ -1,6 +1,7 @@
package app
import (
"flag"
"fmt"
"log"
"proxmoxaas-dashboard/app/common"
@@ -11,7 +12,10 @@ import (
"github.com/tdewolff/minify/v2"
)
func Run(configPath *string) {
func Run() {
configPath := flag.String("config", "config.json", "path to config.json file")
flag.Parse()
common.Global = common.GetConfig(*configPath)
// setup static resources
+1 -4
View File
@@ -1,12 +1,9 @@
package main
import (
"flag"
app "proxmoxaas-dashboard/app"
)
func main() {
configPath := flag.String("config", "config.json", "path to config.json file")
flag.Parse()
app.Run(configPath)
app.Run()
}