]> git.giacomolli.uk - onechat/commit
Require field names in struct literals
authorAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 17:17:52 +0000 (14:17 -0300)
committerAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 17:17:52 +0000 (14:17 -0300)
commit150e81034dc65943803924ef29962e2481ffe771
tree42b2f1671416db4e57c72a728c4919def04e97a5
parent8e8da466ded3b39188862e4b46f40220d65f316e
Require field names in struct literals

Struct literals use field names, with one field on each line when more
than one field is set, and table-driven test cases follow the same rule.
The old rule applied only to keyed literals, so positional test cases
with many fields on one line passed it. A small two-field type that acts
as one value, such as a node key, can still use a positional literal.
.agents/skills/go-code/SKILL.md