Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildInfo ¶
type BuildInfo struct { GoVersion string // Version of Go that produced this binary. Path string // The main package path Main Module // The module containing the main package Deps []*Module // Module dependencies Settings []BuildSetting // Other information about the build. }
BuildInfo represents the build information read from a Go binary.
func ReadBuildInfo ¶
ReadBuildInfo returns the build information embedded in the running binary. The information is available only in binaries built with module support.
func (*BuildInfo) MarshalText ¶
func (*BuildInfo) UnmarshalText ¶
type BuildSetting ¶
type BuildSetting struct {
// Key and Value describe the build setting.
// Key must not contain an equals sign, space, tab, or newline.
// Value must not contain newlines ('\n').
Key, Value string
}
BuildSetting describes a setting that may be used to understand how the binary was built. For example, VCS commit and dirty status is stored here.
Click to show internal directories.
Click to hide internal directories.