Created
December 19, 2017 10:23
-
-
Save nvcnvn/29e83099187889ea130861fdf272e244 to your computer and use it in GitHub Desktop.
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 Car struct {} | |
func (c *Car) Move(to Desitation) {} | |
type Vehicle interface { | |
Move(to Desitation) | |
} | |
type Transporter struct { | |
vehicle Vehicle | |
} | |
func (t *Transporter) makeOutWith(pretty Lady) { | |
// ... | |
} | |
func (t *) hitAllTheBadGuysAt(dest Desination) { | |
t.vehicle.Move(dest) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment