aboutsummaryrefslogtreecommitdiff
path: root/cmd/server/main.go
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2026-01-21 00:40:17 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2026-01-21 00:40:17 -0500
commitcbb0dafad526128d10ff5f4859a1990132e4f75e (patch)
tree97f538f1797a3ff82088d9875b5fcce92b5e812a /cmd/server/main.go
parentc5b07cd82fde44730997068029371f453bf31771 (diff)
downloadgo-website-wip.tar.gz
go-website-wip.tar.xz
Clean up the example site a touch and make a quick pass on the config load errorswip
Diffstat (limited to 'cmd/server/main.go')
-rw-r--r--cmd/server/main.go13
1 files changed, 2 insertions, 11 deletions
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
}