Source File
buildinfo.go
Belonging Package
go.pact.im/x/maininfo
package maininfoimport ()var (modOnce sync.OncemodPath stringmodVersion string)func () {, := debug.ReadBuildInfo()if ! {return}:= .Mainif := .Replace; != nil {= *}modPath, modVersion = .Path, .Version}// Path returns main module’s path. It returns an empty string if an executable// was built without module support.//// If the main module is replaced by another module, it returns the path of that// module.func () string {modOnce.Do(readBuildInfo)return modPath}// Version returns main module’s version. It returns an empty string if an// executable was built without module support.//// If the main module is replaced by another module, it returns the version of// that module.func () string {modOnce.Do(readBuildInfo)return modVersion}
The pages are generated with Golds v0.7.6. (GOOS=linux GOARCH=amd64)