Name the layout without the quotes the user wrote, return a download written on the last attempt, and put the link fences' description back on linkTables
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped

This commit is contained in:
2026-09-18 20:20:59 +02:00
parent c232e65001
commit 5fb5e5f4c8
12 changed files with 40 additions and 36 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ func layoutArity(name string, n int, a []string) error {
}
hint := ""
if len(a) > n && !holdsQuotedLayout(a[n-1:]) {
hint = fmt.Sprintf("; a layout holding a comma is quoted: '%s'", strings.Join(a[n-1:], ", "))
hint = fmt.Sprintf("; a layout holding a comma is quoted: '%s'", strings.Trim(strings.Join(a[n-1:], ", "), `'"`))
}
return fmt.Errorf("%s takes %d argument%s, got %d%s", name, n, plural(n), len(a), hint)
}