Address stability nits: doc grammar, scalar-JSON note, bracket-rule rationale
Tests / vet + fmt + tests (pull_request) Successful in 56s

This commit is contained in:
2026-09-03 17:53:05 +02:00
parent d8ece597c8
commit 305d8f8edd
4 changed files with 15 additions and 12 deletions
+8 -8
View File
@@ -303,14 +303,14 @@ func TestRunShippedDataByDefault(t *testing.T) {
func TestIsTemplate(t *testing.T) {
for arg, want := range map[string]bool{
"sv_SE.person": false,
"person.last": false,
"[abc]": false, // a [ can open a real category name; not JSON
"[abc].field": false,
"name: {x}": true, // a { token: a path can never carry a brace
`{"format":"x"}`: true,
`["a","b"]`: true, // a JSON array carries no brace
`[1, 2]`: true,
"sv_SE.person": false,
"person.last": false,
"[abc]": false, // a [ that is not valid JSON is not a template
"[abc].field": false,
"name: {x}": true, // a { token: a path can never carry a brace
`{"format":"x"}`: true,
`["a","b"]`: true, // a JSON array carries no brace
`[1, 2]`: true,
} {
if got := isTemplate(arg); got != want {
t.Errorf("isTemplate(%q) = %v, want %v", arg, got, want)