GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Why Go
  • Case Studies
  • Use Cases
  • Security
  • Learn
  • Effective Go
  • Go User Manual
  • Standard library
  • Release Notes
  • API
  • Packages
  • Recorded Talks
  • Meetups
  • Conferences

This view

  • Original page
  • New address

GeezerVison is showing pkg.go.dev — buildinfo package - debug/buildinfo - Go Packages

Details

  • checked Valid go.mod file

    The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.

  • checked Redistributable license

    Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.

  • checked Tagged version

    Modules with tagged versions give importers more predictable builds.

  • checked Stable version

    When a project reaches major version v1 it is considered stable.

  • Learn more about best practices

Repository

cs.opensource.google/go/go

Links

  • Report a Vulnerability

Documentation ¶

Overview ¶

Package buildinfo 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).

Build information is available for the currently running binary in runtime/debug.ReadBuildInfo.

Index ¶

  • type BuildInfo
    • func Read(r io.ReaderAt) (*BuildInfo, error)
    • func ReadFile(name string) (info *BuildInfo, err error)

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type BuildInfo ¶

type BuildInfo = debug.BuildInfo

Type alias for build info. We cannot move the types here, since runtime/debug would need to import this package, which would make it a much larger dependency.

func Read ¶

func Read(r io.ReaderAt) (*BuildInfo, error)

Read returns build information embedded in a Go binary file accessed through the given ReaderAt. Most information is only available for binaries built with module support.

func ReadFile ¶

func ReadFile(name string) (info *BuildInfo, err error)

ReadFile returns build information embedded in a Go binary file at the given path. Most information is only available for binaries built with module support.

Source Files ¶

View all Source files
  • buildinfo.go
Click to show internal directories.
Click to hide internal directories.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.