Skip to content

Instantly share code, notes, and snippets.

@hernanhrm
Created November 8, 2022 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hernanhrm/065bc1fc65d802bca0bad218c7d73da6 to your computer and use it in GitHub Desktop.
Save hernanhrm/065bc1fc65d802bca0bad218c7d73da6 to your computer and use it in GitHub Desktop.
type Warrior interface {
Kick()
Punch()
Transform()
}
type Warriors []Warrior
func executeWithoutIPS(warriors Warriors) {
for _, warrior := range warriors {
warrior.Kick()
warrior.Punch()
warrior.Transform()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment