/* func main() { var instanceName string args := os.Args if len(args) < 2 { instanceName = "default" fmt.Println("Loading default config") } else { instanceName = args[1] fmt.Printf("Loading instance: [%s] config", instanceName) } cfg, err := LoadConfig(os.Getenv("HOME") + "/.config/altgit-" + instanceName + ".cfg") if err != nil { fmt.Println("Could not load config file", err) os.Exit(1) } fmt.Println(instanceName) router := gin.Default() router.SetTrustedProxies([]string{"127.0.0.1"}) router.Use(AddressAllowList(cfg.AllowList)) gin.SetMode(gin.ReleaseMode) router.GET("/secret/:secretname", ReadSecret(cfg)) if cfg.ServerTLSCertificate == "" || cfg.ServerTLSKey == "" { router.Run(cfg.Endpoint) } else { router.RunTLS(cfg.Endpoint, cfg.ServerTLSCertificate, cfg.ServerTLSKey) } } */