1
0
mirror of https://github.com/golang/go synced 2024-11-19 08:24:41 -07:00
go/pointer/testdata/hello.go
Alan Donovan f4fca995ad go.tools/pointer: fix test of pts(os.Args) on Windows.
I have no way to test this.

R=crawshaw
CC=alex.brainmain, golang-dev
https://golang.org/cl/17820044
2013-10-31 10:24:00 -04:00

28 lines
487 B
Go

// +build ignore
package main
import (
"fmt"
"os"
)
type S int
var theS S
func (s *S) String() string {
print(s) // @pointsto main.theS
return ""
}
func main() {
// os.Args is considered instrincally allocated,
// but may also be set explicitly (e.g. on Windows), hence '...'.
print(os.Args) // @pointsto <command-line args> | ...
fmt.Println("Hello, World!", &theS)
}
// @calls main.main -> fmt.Println
// @calls (*fmt.pp).handleMethods -> (*main.S).String