1 | //go:build ignore |
---|---|
2 | // +build ignore |
3 | |
4 | package main |
5 | |
6 | import ( |
7 | "fmt" |
8 | "os" |
9 | ) |
10 | |
11 | type S int |
12 | |
13 | var theS S |
14 | |
15 | func (s *S) String() string { |
16 | print(s) // @pointsto command-line-arguments.theS |
17 | return "" |
18 | } |
19 | |
20 | func main() { |
21 | // os.Args is considered intrinsically allocated, |
22 | // but may also be set explicitly (e.g. on Windows), hence '...'. |
23 | print(os.Args) // @pointsto <command-line args> | ... |
24 | fmt.Println("Hello, World!", &theS) |
25 | } |
26 | |
27 | // @calls command-line-arguments.main -> fmt.Println |
28 | // @calls (*fmt.pp).handleMethods -> (*command-line-arguments.S).String |
29 |