Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EmptyErr = errors.New("Empty string cannot be a version") NoVErr = errors.New("No 'v' at start of the version") NoMinorOrPatchErr = errors.New("No minor or patch parts of version") )
View Source
var Tool = mtool.T("semver").Func(func(f *mtool.Flags) { args := f.Parse() if len(args) != 1 { f.Usage() return } v, err := ParseVersion(args[0]) if err != nil { log.Fatalf("error: parsing: %s", err) return } fmt.Printf( "%d\n%d\n%d\n%s\n%s\n", v.Major, v.Minor, v.Patch, v.DetailDelimiter, v.Detail, ) }).Desc( "get different parts of the version in the SemVer format", ).Usage( "<version>", )
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.