go: make StartupSettings a method

This commit is contained in:
leo 2023-03-22 23:04:57 +01:00
parent c945c9fcb7
commit 5cfad662fc
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ
2 changed files with 4 additions and 3 deletions

@ -1,11 +1,12 @@
package app package app
import ( import (
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware" "github.com/labstack/echo/v4/middleware"
) )
func StartupSettings(e *echo.Echo) { func (a *App) StartupSettings() {
e := a.E()
e.HideBanner = true e.HideBanner = true
e.Use(middleware.Logger()) e.Use(middleware.Logger())

2
run.go

@ -28,7 +28,7 @@ func run() error {
e := a.E() e := a.E()
logger := a.Logger() logger := a.Logger()
app.StartupSettings(e) a.StartupSettings()
_, err = config.LoadConfig(*configFlag) _, err = config.LoadConfig(*configFlag)
if err != nil { if err != nil {