Correct IsTemplate's, loadDir's and the README's row-index claims

This commit is contained in:
2026-09-30 21:50:50 +02:00
committed by Lillem4n
parent 0b5124d4d5
commit 4fb81a5672
4 changed files with 7 additions and 13 deletions
+4 -4
View File
@@ -50,10 +50,10 @@ func (f *Generator) FakeTemplate(input string) (string, error) {
}
// IsTemplate reports whether arg is an inline template rather than a path, by its shape: a {
// token, or a JSON object, array or string, is a template, and anything else is a path. A
// name never holds a bracket, a brace or a quote, so an arg holding one that is not valid
// JSON names neither, and errors; so do a template of one reference alone, which is a path
// written as a template, and a path written with a leading /.
// token, or a JSON object, array or string, is a template, and anything else is a path. An
// arg that is not valid JSON errors where it holds a } or a quote, or starts with [, since no
// path may; so do a template of one reference alone, which is a path written as a template,
// and a path written with a leading /.
func IsTemplate(arg string) (bool, error) {
inline, err := isTemplate(arg)
if err != nil {