idiom/empty-struct: add empty struct by anton-fuji · Pull Request #129 · tmrts/go-patterns
Summary
Adds the empty struct idiom to the idioms section.
The empty struct (struct{}) is a well-known Go idiom widely used in the community, but it hasn't been documented in this repository yet.
This PR adds idiom/empty-struct.md with some common use cases.
Changes
- add
idiom/empty-struct.mdwith implementation and usage examples - update
README.mdto include the new pattern in the Idioms table