Documentation
¶
Index ¶
- Constants
- type Version
- func (v *Version) Equals(r Version) bool
- func (v *Version) EqualsString(s string) (ok bool, err error)
- func (v *Version) GetLastCommit() (string, time.Time, bool)
- func (v *Version) LoadFrom(path string) (err error)
- func (v *Version) LoadFromRoot() error
- func (v *Version) LoadFromRuntime() error
- func (v *Version) LoadFromTag(noFetch bool) error
- func (v *Version) Parse(s string) error
- func (v *Version) Read(b []byte) (err error)
- func (v *Version) SaveTo(path string) (err error)
- func (v *Version) SaveToRoot() error
- func (v *Version) String() string
- func (v *Version) StringNoV() (out string)
Constants ¶
View Source
const (
// Filename names the version file
Filename = "version.json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Version ¶
type Version struct {
Major int `json:"major"`
Minor int `json:"minor"`
Patch int `json:"patch"`
Pre string `json:"pre"`
Build string `json:"build"`
// contains filtered or unexported fields
}
Version Basic SemVer structure
func (*Version) EqualsString ¶
EqualsString checks if version is identical to string
func (*Version) GetLastCommit ¶ added in v0.56.0
GetLastCommit returns the embedded vcs-related information
func (*Version) LoadFromRoot ¶
LoadFromRoot loads version from file at the root level
func (*Version) LoadFromRuntime ¶
LoadFromRuntime loads version using the embedded vcs-related values
func (*Version) LoadFromTag ¶
LoadFromTag loads the version from the latest tag
func (*Version) SaveToRoot ¶
SaveToRoot saves the verstion file to the root directory
Click to show internal directories.
Click to hide internal directories.