Skip to content

idiom/empty-struct: add empty struct#129

Open
anton-fuji wants to merge 1 commit intotmrts:masterfrom
anton-fuji:empty-struct-idiom
Open

idiom/empty-struct: add empty struct#129
anton-fuji wants to merge 1 commit intotmrts:masterfrom
anton-fuji:empty-struct-idiom

Conversation

@anton-fuji
Copy link
Copy Markdown

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.md with implementation and usage examples
  • update README.md to include the new pattern in the Idioms table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant