buildinfo

package
v0.267.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDateFrom

func BuildDateFrom(ctx context.Context) (_ *time.Time, err error)

BuildDateFrom takes in context and return the associated build date. It returns nil if build data is not in context.

func SetBuildInfo

func SetBuildInfo(version, date, fullCommit, tags, os, arch, goVersion string)

SetBuildInfo sets the global BuildInfo variable in the buildinfo package.

func WithBuildData

func WithBuildData(ctx context.Context, b BuildData) context.Context

WithBuildData puts build data into context.

func WithPackageBuildData

func WithPackageBuildData(ctx context.Context) context.Context

WithPackageBuildData inserts the global variable BuildInfo into context. BuildInfo is initialized by the main package.

Types

type BuildData

type BuildData struct {
	Version, Date, FullCommit, Tags, Os, Arch, GoVersion string
}

BuildData is a struct that contains build information of arr.ai

var BuildInfo BuildData

BuildInfo represents arr.ai build information.

func BuildDataFrom

func BuildDataFrom(ctx context.Context) *BuildData

BuildDataFrom takes in context and return the BuildData.

Jump to

Keyboard shortcuts

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