Documentation
¶
Index ¶
- Constants
- func CommitHash() string
- func CommitHashFromGit(path string) (string, error)
- func FullVersion() string
- func FullVersionFromGit(path, appName string) (string, error)
- func SetCommitHash(hash string)
- func SetCommitHashFromGit(path string) error
- func SetFromGit(path, appName string) error
- func SetVersion(ver string)
- func SetVersionFromGit(path, appName string) error
- func Version() string
- func VersionFromGit(path, appName string) (string, error)
Constants ¶
View Source
const ( // DefaultHash is the default hash if there is no hash provided DefaultHash = "dev" // DefaultVersion is the default version if there is no hash provided DefaultVersion = "0.0.0" )
Variables ¶
This section is empty.
Functions ¶
func CommitHash ¶
func CommitHash() string
CommitHash returns a string representing the current commitHash
func CommitHashFromGit ¶
func FullVersion ¶
func FullVersion() string
FullVersion returns a string representing the version and commit hash concatenated separated by a -
returns only the version if the commit hash is not defined
func FullVersionFromGit ¶
func SetCommitHash ¶
func SetCommitHash(hash string)
SetCommitHash sets the commit hash of the application to the value provided as hash empty values are accepted
func SetCommitHashFromGit ¶
func SetFromGit ¶
SetFromGit sets the commit hash and the version from the last git
func SetVersion ¶
func SetVersion(ver string)
SetVersion sets the version to tha value provided as ver unless ver is empty
func SetVersionFromGit ¶
func VersionFromGit ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.