Created
February 22, 2019 12:14
-
-
Save J7mbo/ee7779e87f96c8475f1bff97e38b6829 to your computer and use it in GitHub Desktop.
golang-constructors-blog-15
This file contains hidden or 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 consumer struct { } | |
func NewConsumer() *consumer { | |
return &consumer{} | |
} | |
func (*consumer) DoSomething(obj interfaceToConsume) { | |
/* We can actually pass in a Package1.myStruct here! */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment