-
-
Save 0rka/420560d10a26a26cac491410d67e6517 to your computer and use it in GitHub Desktop.
Movie
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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