panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/paulopacitti/bacon/cmd.retrieveDNS({{0xc000106140, 0x44}, {0xc000106190, 0x44}, {0xc0000b09c0, 0x9}, {0xbe9080, 0x1}, {0xbe8f48, 0x1}})
/root/go/pkg/mod/github.com/paulopacitti/[email protected]/cmd/update.go:138 +0x4cb
github.com/paulopacitti/bacon/cmd.runUpdate(0xc0000aeb00?, {0x89e5a3?, 0x4?, 0x89e5a7?})
/root/go/pkg/mod/github.com/paulopacitti/[email protected]/cmd/update.go:203 +0x198
github.com/spf13/cobra.(*Command).execute(0xc181c0, {0xc7e4a0, 0x0, 0x0})
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:940 +0x882
github.com/spf13/cobra.(*Command).ExecuteC(0xc17ee0)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
github.com/paulopacitti/bacon/cmd.Execute()
/root/go/pkg/mod/github.com/paulopacitti/[email protected]/cmd/root.go:17 +0x1a
main.main()
/root/go/pkg/mod/github.com/paulopacitti/[email protected]/main.go:8 +0xf
Would be nice to handle this error by either creating it automatically or printing a more user friendly error.