diff options
author | Alan Pearce | 2024-05-24 23:07:36 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-24 23:07:36 +0200 |
commit | 3510170ca4fdc60a212dd7519596f9f7dd502998 (patch) | |
tree | 3fd3171c26f9a69e9b3dd249a2f40d54e5140003 | |
parent | 6a822598a5af45317f48f647e03c020c3a58b9c3 (diff) | |
download | website-3510170ca4fdc60a212dd7519596f9f7dd502998.tar.lz website-3510170ca4fdc60a212dd7519596f9f7dd502998.tar.zst website-3510170ca4fdc60a212dd7519596f9f7dd502998.zip |
refactor: remove unnecessary package-global variable
-rw-r--r-- | internal/server/server.go | 4 |
1 files changed, 1 insertions, 3 deletions
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") } |