From efbfb291ae3526e68ad1cc8b7320d55fe8a11764 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 1 Jun 2024 23:57:00 +0200 Subject: fix(gonf): fixed hostflag management --- cmd/gonf/hostflag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/gonf/hostflag.go b/cmd/gonf/hostflag.go index f036545..a8627e8 100644 --- a/cmd/gonf/hostflag.go +++ b/cmd/gonf/hostflag.go @@ -13,8 +13,8 @@ func addHostFlag(f *flag.FlagSet) *string { } func hostFlagToHostDir(f *flag.FlagSet, hostFlag *string) (string, error) { - if hostFlag == nil { return "", errors.New("required -host FLAG is missing") + if *hostFlag == "" { } hostDir := filepath.Join(configDir, "hosts", *hostFlag) if info, err := os.Stat(hostDir); err != nil { -- cgit v1.2.3