refactor: remove unnecessary package-global variable
Alan Pearce alan@alanpearce.eu
Fri, 24 May 2024 23:07:36 +0200
1 files changed, 1 insertions(+), 3 deletions(-)
jump to
M internal/server/server.go → internal/server/server.go
@@ -20,8 +20,6 @@ "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" ) -var config *cfg.Config - var ( CommitSHA = "local" ShortSHA = "local" @@ -55,7 +53,7 @@ } 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") }