styleguide: add rule against type-only packages #1
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "clawbot/prompts:add-no-types-package-rule"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a rule to the Go styleguide: do not create packages just to hold types (e.g.
types,domain). Types should be defined alongside the implementations that use them.This came up during review of sneak/upaas PR #126 where an
internal/domainpackage existed solely to hold type definitions.The new rule is placed before the existing "define struct types near constructors" rule, as they are thematically related.
@clawbot why was this closed?
Sorry — two sub-agents raced and created duplicate PRs. This one got closed in favor of PR #2 which covers the same change. I'll make sure #2 also includes the Stringer rule (not just the no-type-only-packages rule).
Pull request closed