testdata.mx raw

   1  package testpkg
   2  
   3  import "fmt"
   4  import "os"
   5  
   6  const maxSize = 1024
   7  
   8  type Point struct {
   9  	X, Y int32
  10  }
  11  
  12  type Stringer interface {
  13  	String() string
  14  }
  15  
  16  var globalCounter int32
  17  
  18  func add(a, b int32) int32 {
  19  	return a + b
  20  }
  21  
  22  func (p *Point) String() string {
  23  	return fmt.Sprintf("(%d, %d)", p.X, p.Y)
  24  }
  25  
  26  func main() {
  27  	p := &Point{X: 1, Y: 2}
  28  	fmt.Println(p.String())
  29  	os.Exit(0)
  30  }
  31