mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
new --version option and qualities method in obiscript
Former-commit-id: 7b0ce2901785d5c7494dec3a7a95d1fc5dc4a52b
This commit is contained in:
@ -21,6 +21,7 @@ var _BatchSize = 5000
|
||||
var _Pprof = false
|
||||
var _Quality_Shift_Input = 33
|
||||
var _Quality_Shift_Output = 33
|
||||
var _Version = "4.2.1"
|
||||
|
||||
type ArgumentParser func([]string) (*getoptions.GetOpt, []string)
|
||||
|
||||
@ -30,6 +31,7 @@ func GenerateOptionParser(optionset ...func(*getoptions.GetOpt)) ArgumentParser
|
||||
options.SetMode(getoptions.Bundling)
|
||||
options.SetUnknownMode(getoptions.Fail)
|
||||
options.Bool("help", false, options.Alias("h", "?"))
|
||||
options.Bool("version", false)
|
||||
options.BoolVar(&_Debug, "debug", false)
|
||||
options.BoolVar(&_Pprof, "pprof", false)
|
||||
|
||||
@ -62,6 +64,11 @@ func GenerateOptionParser(optionset ...func(*getoptions.GetOpt)) ArgumentParser
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if options.Called("version") {
|
||||
fmt.Fprintf(os.Stderr, "obitools version %s\n", _Version)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
log.SetLevel(log.InfoLevel)
|
||||
if options.Called("debug") {
|
||||
log.SetLevel(log.DebugLevel)
|
||||
|
Reference in New Issue
Block a user