gitinfo

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 3 Imported by: 0

README

gitinfo

Go Reference

A tiny shim over debug.BuildInfo that extracts Git-specific VCS information.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoBuildInfo = errors.New("could not read build info")
	ErrNoGit       = errors.New("vcs is not git")
)

Functions

This section is empty.

Types

type GitInfo

type GitInfo struct {
	Revision string
	Time     time.Time
	Modified bool
}

GitInfo is the git info for a build

func MustReadGitInfo

func MustReadGitInfo() *GitInfo

MustReadGitInfo returns GitInfo, or dev info when encountering an error

func ReadGitInfo

func ReadGitInfo() (*GitInfo, error)

ReadGitInfo returns the GitInfo for a build

Jump to

Keyboard shortcuts

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