From 15cca702c64ba1cf280ba87c5164285b2bc119db Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 9 Mar 2022 11:10:12 +0300 Subject: [PATCH] More correct spelling --- cfg.go | 2 +- handler.go | 2 +- rc/example.cfg/go.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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"}, } } -- 2.48.1