style: strengthen constructor naming and Params struct rules #19

Merged
sneak merged 4 commits from style/constructor-naming-params into main 2026-03-20 07:06:03 +01:00
4 Commits
Author SHA1 Message Date
user a8a469ed31 fix: update last_modified date in CODE_STYLEGUIDE_GO.md
check / check (push) Successful in 6s
2026-03-17 21:49:15 -07:00
clawbot d83bd08d4d style: fix prettier formatting in constructor naming section
check / check (push) Successful in 6s
2026-03-17 21:41:33 -07:00
user 4c643d1aa2 style: Params struct required even for single arguments
Only exception: stupidly obvious single args (featureflag.New(true)).
When in doubt, use Params.
2026-03-17 21:41:33 -07:00
user e72b2d3522 style: strengthen constructor naming and Params struct rules
- Constructors must be New(), From<Something>(), or NewThing() (multi-type pkg)
- Strongly discourage creative names (Create, Make, Build, Init)
- Constructors must use Params struct for 2+ arguments, no exceptions
- Single obvious argument (ctx, bytes) is the only exception
2026-03-17 21:41:33 -07:00