Versions in this module Expand all Collapse all v2 v2.0.1 Oct 8, 2024 Changes in this version + func CheckGitRepo(dir string) (repo string, err error) + type DefaultGitter string + func (dg DefaultGitter) GetBranch(repo string) (branch string) + func (dg DefaultGitter) GetBranchesFromTag(repo, tag string) (branches []string) + func (dg DefaultGitter) GetBuild(repo string) string + func (dg DefaultGitter) GetTag(repo string) string + func (dg DefaultGitter) GetTagForHEAD(repo string) (tag string) + type Environment interface + Getenv func(string) string + LookupEnv func(string) (string, bool) + type Gitter interface + GetBranch func(repo string) string + GetBranchesFromTag func(repo, tag string) []string + GetBuild func(repo string) string + GetTag func(repo string) string + GetTagForHEAD func(repo string) string + func NewDefaultGitter(gitBin string) (gitter Gitter, err error) + type OsEnvironment struct + func (OsEnvironment) Getenv(key string) string + func (OsEnvironment) LookupEnv(key string) (string, bool) + type VersionInfo struct + Branch string + Build string + Tag string + Version string + func (vi *VersionInfo) Render(pkgName string) (string, error) + type VersionStringer struct + Env Environment + Git Gitter + func NewVersionStringer(gitBin string) (vs *VersionStringer, err error) + func (vs *VersionStringer) GetBranch(repo string) (branchText, branchName string) + func (vs *VersionStringer) GetBuild(repo string) (build string) + func (vs *VersionStringer) GetTag(repo string) (tag string, err error) + func (vs *VersionStringer) GetVersion(repo string) (vi VersionInfo, err error) + func (vs *VersionStringer) IsEnvTrue(envvar string) bool + func (vs *VersionStringer) IsReleaseBranch(branchName string) bool Other modules containing this package github.com/cparta/makeversion