Tags: #go #expressions
// https://play.golang.com/p/iPOOcSzZCe7
package main
import (
"fmt"
)
type Foo struct {
Bar string
}
func (f Foo) String() string {
return f.Bar + " stuff happens"
}
func main() {
f := Foo{Bar: "Baz"}
fmt.Println(Foo.String(f))
}