"github.com/spf13/viper"
)
-const ROBOTSTXT_TEMPLATE = `User-agent: Googlebot
+const robotTxtTemplate = `User-agent: Googlebot
{{ range .Data.Pages }}
Disallow: {{.RelPermalink}}
{{ end }}
s.initializeSiteInfo()
- s.prepTemplates("robots.txt", ROBOTSTXT_TEMPLATE)
+ s.prepTemplates("robots.txt", robotTxtTemplate)
if err := s.CreatePages(); err != nil {
t.Fatalf("Unable to create pages: %s", err)
mu sync.RWMutex
}
-// For single values, Add will add (using the + operator) the addend to the existing addend (if found).
+// Add will, for single values, add (using the + operator) the addend to the existing addend (if found).
// Supports numeric values and strings.
//
// If the first add for a key is an array or slice, then the next value(s) will be appended.