(c userconfig.Config)
| 253 | } |
| 254 | |
| 255 | func validateTemplateFiles(c userconfig.Config) error { |
| 256 | for fn, content := range c.TemplateFiles { |
| 257 | if _, err := template.New(fn).Funcs(template.FuncMap(amtemplate.DefaultFuncs)).Parse(content); err != nil { |
| 258 | return err |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | return nil |
| 263 | } |
| 264 | |
| 265 | // ConfigsView renders multiple configurations, mapping userID to userconfig.View. |
| 266 | // Exposed only for tests. |