build

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package build provides details of the built binary The details are set using ldflags.

The ldflags can be set manually for testing locally: `go build -ldflags "-X github.com/gomods/athens/pkg/build.version=$(git describe --tags) -X github.com/gomods/athens/pkg/build.buildDate=$(date -u +%Y-%m-%d-%H:%M:%S-%Z)"`

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String() string

String returns build details as a string with formatting suitable for console output.

i.e. Build Details:

Version:        v0.1.0-155-g1a20f8b
Date:           2018-11-05-14:33:14-UTC

Types

type Details

type Details struct {
	Version string `json:"version,omitempty"`
	Date    string `json:"date,omitempty"`
}

Details represents known data for a given build.

func Data

func Data() Details

Data returns build details as a struct.

Jump to

Keyboard shortcuts

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