Skip to content

Instantly share code, notes, and snippets.

@AntonStoeckl
Created May 20, 2022 10:57
Show Gist options
  • Save AntonStoeckl/edf7e28d8993c3c960197a501b68e377 to your computer and use it in GitHub Desktop.
Save AntonStoeckl/edf7e28d8993c3c960197a501b68e377 to your computer and use it in GitHub Desktop.
Example for Blog Post "Hexagonal Architecture: Structuring a project and the influence of granularity"
# the coarse-grained version
type ForSelectingDecks interface {
Select(command SelectDeckCommand) error
Unselect(command UnselectDeckCommand) error
}
# the fine-grained version
type ForSelectingDecks interface {
Select(command SelectDeckCommand) error
}
type ForUnselectingDecks interface {
Unselect(command UnselectDeckCommand) error
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment