From: Sergey Matveev Date: Wed, 9 Mar 2022 08:10:12 +0000 (+0300) Subject: More correct spelling X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=15cca702c64ba1cf280ba87c5164285b2bc119db;p=godlighty.git More correct spelling --- diff --git a/cfg.go b/cfg.go index f81f27c..b1e274b 100644 --- a/cfg.go +++ b/cfg.go @@ -46,7 +46,7 @@ type HostCfg struct { Hooks []Hook Auth *AuthCfg - Indexes []string + Indices []string Readmes []string MIMEs map[string]string } diff --git a/handler.go b/handler.go index d8e6ee6..e6d63fc 100644 --- a/handler.go +++ b/handler.go @@ -213,7 +213,7 @@ IndexLookup: } contentType = "text/html; charset=utf-8" } else { - for _, index := range append(cfg.Indexes, Index) { + for _, index := range append(cfg.Indices, Index) { p := path.Join(pth, index) if _, err := os.Stat(p); err == nil { pth = p diff --git a/rc/example.cfg/go.go b/rc/example.cfg/go.go index 11efeea..845dfcc 100644 --- a/rc/example.cfg/go.go +++ b/rc/example.cfg/go.go @@ -11,7 +11,7 @@ func addGoRepoCfg(host string) { Root: path.Join(WWW, host), TLS: newTLSCfg(host), MIMEs: map[string]string{"": "text/html"}, - Indexes: []string{"v1"}, + Indices: []string{"v1"}, } }