Skip to content

Instantly share code, notes, and snippets.

@enocom
Created November 15, 2015 12:49
Show Gist options
  • Save enocom/8c8178176ab47f7f5206 to your computer and use it in GitHub Desktop.
Save enocom/8c8178176ab47f7f5206 to your computer and use it in GitHub Desktop.
package main
import "fmt"
type T struct{}
func (t T) Method() {
fmt.Println("Hey there")
}
func main() {
t := T{}
t.Method() // this is valid
(T).Method(t) // this too
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment