Updated for go 1.16 modules
This commit is contained in:
parent
8278d7b471
commit
38d9c881b3
25 changed files with 25 additions and 19 deletions
21
pkg/zabbix/flags.go
Normal file
21
pkg/zabbix/flags.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package zabbix
|
||||
|
||||
import (
|
||||
"flag"
|
||||
)
|
||||
|
||||
var (
|
||||
stateFileName string
|
||||
workDir string
|
||||
)
|
||||
|
||||
func processFlags() (err error) {
|
||||
flag.StringVar(&stateFileName, "f", "", "Force the state file to use, defaults to "+bareosStateFile+" if it exists else "+baculaStateFile+".")
|
||||
flag.StringVar(&workDir, "w", "", "Force the work directory to use, defaults to "+bareosWorkDir+" if it exists else "+baculaWorkDir+".")
|
||||
flag.Parse()
|
||||
err = checkWorkDir()
|
||||
if err == nil {
|
||||
err = checkStateFile()
|
||||
}
|
||||
return
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue