From cbb0dafad526128d10ff5f4859a1990132e4f75e Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Wed, 21 Jan 2026 00:40:17 -0500 Subject: Clean up the example site a touch and make a quick pass on the config load errors --- cmd/server/main.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'cmd/server/main.go') diff --git a/cmd/server/main.go b/cmd/server/main.go index a776980..1b59bbe 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -36,7 +36,6 @@ func main() { //nolint:funlen directory = "." version = false confFn = "conf.yml" - authConfFn = "auth.json" verbose = false defaultIndexPath = "/reIndex" indexPath = "/reIndex" @@ -56,8 +55,6 @@ func main() { //nolint:funlen "print version and exit")) envflag.String(fl, &confFn, "c", "CONFIG_FILE", "Location for configuration file") - envflag.String(fl, &authConfFn, "ac", "AUTH_CONFIG", - "location for the authorization config") logIfErr(envflag.Bool(fl, &verbose, "V", "VERBOSE", "Be more verbose, dump config and such")) envflag.String(fl, &page.TimeFormat, "T", "TIME_FORMAT", @@ -94,20 +91,14 @@ func main() { //nolint:funlen app, err := loadConf(confFn) if err != nil { - logger.Println(err) - - app = &App{} + logger.Print(err) + logger.Fatal("A configuration file must be supplied. No valid config read") } if mapcache { app.mapCache = true } - err = app.ReadAuth(authConfFn) - if err != nil { - logger.Println(err) - } - if app.ReIndexPath == "" || indexPath != defaultIndexPath { app.ReIndexPath = indexPath } -- cgit v1.2.3