binversion

package
v0.0.0-...-8f37b9b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2024 License: Apache-2.0, BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package binversion provides access to information embedded in a Go binary about how it was built. This includes the Go toolchain version, and the set of modules used (for binaries built in module mode).

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrNotGoExe is returned when a given executable file is valid but does
	// not contain Go build information.
	ErrNotGoExe = errors.New("not a Go executable")
)

Functions

func ReadElfBuildInfo

func ReadElfBuildInfo(elfFile *safeelf.File) (vers string, err error)

ReadElfBuildInfo extracts the Go toolchain version and module information strings from a Go binary. On success, vers should be non-empty. mod is empty if the binary was not built with modules enabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL