Skip to content

Instantly share code, notes, and snippets.

@rbranson
Created January 26, 2016 21:21
Show Gist options
  • Select an option

  • Save rbranson/1a8f6c039fc529bfde05 to your computer and use it in GitHub Desktop.

Select an option

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