Skip to content

Instantly share code, notes, and snippets.

@ncomet
Created May 2, 2022 12:43
Show Gist options
  • Save ncomet/54ee4cd071633707016fef4ef466f4df to your computer and use it in GitHub Desktop.
Save ncomet/54ee4cd071633707016fef4ef466f4df to your computer and use it in GitHub Desktop.
Games Repository
package domain
type PEGI int
type GameId string
const (
Three PEGI = iota
Seven
Twelve
Sixteen
Eighteen
)
type Game struct {
Id GameId
Title string
PEGI PEGI
}
type AllGames interface {
All() []*Game
Add(*Game)
Remove(*Game)
By(GameId) *Game
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment