about summary refs log tree commit diff stats
path: root/internal
diff options
context:
space:
mode:
authorAlan Pearce2024-05-24 23:07:36 +0200
committerAlan Pearce2024-05-24 23:07:36 +0200
commit3510170ca4fdc60a212dd7519596f9f7dd502998 (patch)
tree3fd3171c26f9a69e9b3dd249a2f40d54e5140003 /internal
parent6a822598a5af45317f48f647e03c020c3a58b9c3 (diff)
downloadwebsite-3510170ca4fdc60a212dd7519596f9f7dd502998.tar.lz
website-3510170ca4fdc60a212dd7519596f9f7dd502998.tar.zst
website-3510170ca4fdc60a212dd7519596f9f7dd502998.zip
refactor: remove unnecessary package-global variable
Diffstat (limited to 'internal')
-rw-r--r--internal/server/server.go4
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")
 	}