build

package
v0.0.0-...-0253919 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: AGPL-3.0 Imports: 8 Imported by: 1

README

build

import go.pitz.tech/lib/build

Usage

type Info
type Info struct {
	OS           string
	Architecture string

	GoVersion  string
	CGoEnabled bool

	Version  string
	VCS      string
	Revision string
	Compiled time.Time
	Modified bool
}

Info defines common build information associated with the binary.

func ParseInfo
func ParseInfo() (info Info)

ParseInfo extracts as much build information from the compiled binary as it can.

func (Info) Metadata
func (info Info) Metadata() map[string]any

Metadata formats the underlying information as a generalized key-value map.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	OS           string
	Architecture string

	GoVersion  string
	CGoEnabled bool

	Version  string
	VCS      string
	Revision string
	Compiled time.Time
	Modified bool
}

Info defines common build information associated with the binary.

func ParseInfo

func ParseInfo() (info Info)

ParseInfo extracts as much build information from the compiled binary as it can.

func (Info) Metadata

func (info Info) Metadata() map[string]any

Metadata formats the underlying information as a generalized key-value map.

type KV

type KV struct {
	Key   string
	Value string
}

type KVSlice

type KVSlice []KV

func (*KVSlice) Set

func (s *KVSlice) Set(value string) error

func (*KVSlice) String

func (s *KVSlice) String() string

Jump to

Keyboard shortcuts

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