]> Sergey Matveev's repositories - godlighty.git/commitdiff
More correct spelling
authorSergey Matveev <stargrave@stargrave.org>
Wed, 9 Mar 2022 08:10:12 +0000 (11:10 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 9 Mar 2022 08:10:46 +0000 (11:10 +0300)
cfg.go
handler.go
rc/example.cfg/go.go

diff --git a/cfg.go b/cfg.go
index f81f27c142cc54d2fe4a98b646434f1c6340b90e..b1e274bf36daf6a35d5ac939b3806f4f24e45d96 100644 (file)
--- 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
 }
index d8e6ee6ccc5df3ba424efc3e7171169206470bf4..e6d63fc6e76911358a5aa41dc1b266e7d59bc671 100644 (file)
@@ -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
index 11efeea060fbbca949778225df112eff2109f13f..845dfcc308514bf364c85fb4380cc13fca731a68 100644 (file)
@@ -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"},
        }
 }