GoPLS Viewer

Home|gopls/go/pointer/testdata/hello.go
1//go:build ignore
2// +build ignore
3
4package main
5
6import (
7    "fmt"
8    "os"
9)
10
11type S int
12
13var theS S
14
15func (s *SString() string {
16    print(s// @pointsto command-line-arguments.theS
17    return ""
18}
19
20func 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
MembersX
fmt
os
theS
S.String.s
Members
X