diff --git a/admin.go b/admin.go index 1d95130..0b8cacf 100644 --- a/admin.go +++ b/admin.go @@ -56,6 +56,10 @@ func (a *AdminConfig) Run() { ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) defer stop() + if !*debug { + gin.SetMode(gin.ReleaseMode) + } + r := gin.Default() r.GET("/ping", func(c *gin.Context) { c.JSON(http.StatusOK, gin.H{ @@ -64,7 +68,7 @@ func (a *AdminConfig) Run() { }) srv := &http.Server{ - Addr: ":8080", + Addr: a.Addr, Handler: r, } diff --git a/backup.go b/backup.go index 6627d39..398be69 100644 --- a/backup.go +++ b/backup.go @@ -4,7 +4,6 @@ import ( "flag" "fmt" "os" - "time" log "github.com/sirupsen/logrus" ) @@ -41,10 +40,6 @@ func main() { } log.SetReportCaller(true) - email = new(Email) - email.startTime = time.Now() - email.items = make([]string, 0) - if err := cfg.LoadFile(*cfgFile); err != nil { log.Printf("Cannot load config (%s)", err) os.Exit(1) diff --git a/version.go b/version.go index 9925483..442f6bc 100644 --- a/version.go +++ b/version.go @@ -1,7 +1,7 @@ // Code generated by version.sh (@generated) DO NOT EDIT. package main -var githash = "da53fcf" +var githash = "ca3d817" var branch = "v2" -var buildstamp = "2023-07-31_09:23:23" -var commits = "73" -var version = "da53fcf-b73 - 2023-07-31_09:23:23" +var buildstamp = "2023-07-31_16:19:11" +var commits = "75" +var version = "ca3d817-b75 - 2023-07-31_16:19:11"