fix(gonf): fixed hostflag management
This commit is contained in:
parent
0459fac5d3
commit
efbfb291ae
1 changed files with 1 additions and 1 deletions
|
@ -13,8 +13,8 @@ func addHostFlag(f *flag.FlagSet) *string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func hostFlagToHostDir(f *flag.FlagSet, hostFlag *string) (string, error) {
|
func hostFlagToHostDir(f *flag.FlagSet, hostFlag *string) (string, error) {
|
||||||
if hostFlag == nil {
|
|
||||||
return "", errors.New("required -host FLAG is missing")
|
return "", errors.New("required -host FLAG is missing")
|
||||||
|
if *hostFlag == "" {
|
||||||
}
|
}
|
||||||
hostDir := filepath.Join(configDir, "hosts", *hostFlag)
|
hostDir := filepath.Join(configDir, "hosts", *hostFlag)
|
||||||
if info, err := os.Stat(hostDir); err != nil {
|
if info, err := os.Stat(hostDir); err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue