Rename BaseConf.New to BaseConf.Get

Since BaseConf.New could return a cached BaseConf, rather than always
constructing a new struct, I've renamed it to Get to more accurately
reflect its use. A new New() method is called by Get and always
initializes a new struct.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
This commit is contained in:
Jonathon Anderson
2023-04-14 17:29:35 -06:00
parent f78e6b73b1
commit 70292276e2
28 changed files with 65 additions and 62 deletions

View File

@@ -58,7 +58,7 @@ func RunServer() error {
http.HandleFunc("/overlay-runtime/", ProvisionSend)
http.HandleFunc("/status", StatusSend)
conf := warewulfconf.New()
conf := warewulfconf.Get()
daemonPort := conf.Warewulf.Port
wwlog.Serv("Starting HTTPD REST service on port %d", daemonPort)