blob: 248730d239589c36b4314a41fd1149f5d55c09bc [file] [log] [blame]
// +build ignore,OMIT
package main
import "fmt"
// Point START OMIT
type Point struct {
x, y int
}
// Point END OMIT
// String START OMIT
func (p Point) String() string {
return fmt.Sprintf("(%d, %d)", p.x, p.y)
}
// String END OMIT
// main START OMIT
func main() {
p := Point{2, 3}
fmt.Println(p.String())
fmt.Println(Point{3, 5}.String())
}
// main END OMIT