Skip to content

Instantly share code, notes, and snippets.

@rbranson
Created January 26, 2016 21:21
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 rbranson/1a8f6c039fc529bfde05 to your computer and use it in GitHub Desktop.
Save rbranson/1a8f6c039fc529bfde05 to your computer and use it in GitHub Desktop.
type Q interface {
Hello() string
}
type A struct {
}
func (x *A) Hello() {
return "Hello!"
}
func passInterfaceByRef(x Q) {
// ...
}
func passStructByRef(x *A) {
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment