From 3510170ca4fdc60a212dd7519596f9f7dd502998 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 24 May 2024 23:07:36 +0200 Subject: refactor: remove unnecessary package-global variable --- internal/server/server.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'internal/server') diff --git a/internal/server/server.go b/internal/server/server.go index 9038c04..c72368c 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -20,8 +20,6 @@ import ( "golang.org/x/net/http2/h2c" ) -var config *cfg.Config - var ( CommitSHA = "local" ShortSHA = "local" @@ -55,7 +53,7 @@ func serverHeaderHandler(wrappedHandler http.Handler) http.Handler { func New(runtimeConfig *Config) (*Server, error) { var err error - config, err = cfg.GetConfig() + config, err := cfg.GetConfig() if err != nil { return nil, errors.WithMessage(err, "error parsing configuration file") } -- cgit 1.4.1