go-api-boilerplate: github.com/vardius/go-api-boilerplate/pkg/buildinfo Index | Files

package buildinfo

import "github.com/vardius/go-api-boilerplate/pkg/buildinfo"

Index

Package Files

version.go

Variables

var (
    // Version is baked by go build -ldflags "-X github.com/vardius/go-api-boilerplate/pkg/buildinfo.Version=$VERSION"
    Version string
    // GitCommit is baked by go build -ldflags "-X github.com/vardius/go-api-boilerplate/pkg/buildinfo.GitCommit=$GIT_COMMIT"
    GitCommit string
    // BuildTime is baked by go build -ldflags "-X 'github.com/vardius/go-api-boilerplate/pkg/buildinfo.BuildTime=$(date -u '+%Y-%m-%d %H:%M:%S')'"
    BuildTime string
)

func PrintVersionOrContinue Uses

func PrintVersionOrContinue()

PrintVersionOrContinue will print git commit and exit with os.Exit(0) if CLI v flag is present

Package buildinfo imports 3 packages (graph) and is imported by 2 packages. Updated 2020-08-04. Refresh now. Tools for package owners.