mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-25 17:45:39 +00:00
commit
bd52b623df
2 changed files with 24 additions and 0 deletions
|
@ -26,6 +26,7 @@ var (
|
|||
flBsdKeywords = flag.Bool("bsd-keywords", false, "only operate on keywords that are supported by upstream mtree(8)")
|
||||
flListUsedKeywords = flag.Bool("list-used", false, "list all the keywords found in a validation manifest")
|
||||
flDebug = flag.Bool("debug", false, "output debug info to STDERR")
|
||||
flVersion = flag.Bool("version", false, "display the version of this tool")
|
||||
)
|
||||
|
||||
var formats = map[string]func(*mtree.Result) string{
|
||||
|
@ -72,6 +73,11 @@ func main() {
|
|||
}
|
||||
}()
|
||||
|
||||
if *flVersion {
|
||||
fmt.Printf("%s :: %s\n", os.Args[0], mtree.Version)
|
||||
return
|
||||
}
|
||||
|
||||
// -list-keywords
|
||||
if *flListKeywords {
|
||||
fmt.Println("Available keywords:")
|
||||
|
|
18
version.go
Normal file
18
version.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package mtree
|
||||
|
||||
import "fmt"
|
||||
|
||||
const (
|
||||
// VersionMajor is for an API incompatible changes
|
||||
VersionMajor = 0
|
||||
// VersionMinor is for functionality in a backwards-compatible manner
|
||||
VersionMinor = 3
|
||||
// VersionPatch is for backwards-compatible bug fixes
|
||||
VersionPatch = 0
|
||||
|
||||
// VersionDev indicates development branch. Releases will be empty string.
|
||||
VersionDev = "-dev"
|
||||
)
|
||||
|
||||
// Version is the specification version that the package types support.
|
||||
var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev)
|
Loading…
Reference in a new issue