Skip to content

Instantly share code, notes, and snippets.

@0rka
Created January 28, 2018 11:29
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 0rka/420560d10a26a26cac491410d67e6517 to your computer and use it in GitHub Desktop.
Save 0rka/420560d10a26a26cac491410d67e6517 to your computer and use it in GitHub Desktop.
Movie
type Movie struct {
Title string `json:"title"`
Length int `json:"length"`
}
func (m *Movie) Play() error {
time.Sleep(time.Duration(m.Length) * time.Minute)
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment