// IsToolchainProgram reports whether a program with the given path is a Go // toolchain program. func IsToolchainProgram(progPath string) bool { … } // ProgramInfo extracts the go version, program package path, and program // version to use for counter files. // // For programs in the Go toolchain, the program version will be the same as // the Go version, and will typically be of the form "go1.2.3", not a semantic // version of the form "v1.2.3". Go versions may also include spaces and // special characters. func ProgramInfo(info *debug.BuildInfo) (goVers, progPath, progVers string) { … }