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) Load() (err error)
- func (v *Version) LoadFrom(dir string) (err error)
- func (v *Version) Parse(s string) error
- func (v *Version) Read(b []byte) (err error)
- func (v *Version) Save() (err error)
- func (v *Version) SaveTo(dir string) (err 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) Load ¶ added in v0.56.1
Load loads the version file from the current working directory
func (*Version) Save ¶ added in v0.56.1
Save saves the version file to the current working directory
Click to show internal directories.
Click to hide internal directories.