Created
November 15, 2015 12:49
-
-
Save enocom/8c8178176ab47f7f5206 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
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