diff options
| -rw-r--r-- | doRebuild.go | 12 | ||||
| -rw-r--r-- | ipv6test.go | 18 |
2 files changed, 28 insertions, 2 deletions
diff --git a/doRebuild.go b/doRebuild.go index 4a8738d..7f2315b 100644 --- a/doRebuild.go +++ b/doRebuild.go @@ -118,6 +118,18 @@ func checkBuildRequirements() (string, error) { } else { log.Info("goimports at path:", path) } + // go install -v -x google.golang.org/protobuf/cmd/protoc-gen-go@latest + if path, err := fhelp.CheckCmd("protoc-gen-go"); err != nil { + log.Printf("goimports missing path(%s) err(%v)\n", path, err) + cmd := []string{"go", "install", "-v", "-x", "google.golang.org/protobuf/cmd/protoc-gen-go@latest"} + log.Info("TRYING TO INSTALL protoc-gen-go", cmd) + log.Info("TRYING TO INSTALL protoc-gen-go", cmd) + log.Info("TRYING TO INSTALL protoc-gen-go", cmd) + shell.RunVerboseOnError(cmd) + allerr = errors.Join(allerr, err) + } else { + log.Info("goimports at path:", path) + } if path, err := fhelp.CheckCmd("autogenpb"); err != nil { log.Printf("autogenpb missing path(%s) err(%v)\n", path, err) cmd := []string{"go", "install", "-v", "-x", "go.wit.com/apps/autogenpb@latest"} diff --git a/ipv6test.go b/ipv6test.go index c6befb0..24081ae 100644 --- a/ipv6test.go +++ b/ipv6test.go @@ -23,10 +23,24 @@ func ipv6fails() bool { log.Info(s) WarningForIpv4() s = "THIS FEATURE IS NOT SUPPORTED ON IPv4" - argvpb.BadExit(s, nil) + argvpb.BadExit(s, err) + } + if len(addrs) == 0 { + s = "THIS FEATURE IS NOT SUPPORTED ON IPv4." + argvpb.BadExit(s, errors.New("IPv6 DNS is not returning ip addresses")) + } + + addrs, err = LookupIPv6("cgit.grid.wit.com") + if err != nil { + log.Printf("%v\n", err) + log.Info(s) + WarningForIpv4() + s = "Your OS is not correctly resolving IPv6 addresses." + argvpb.BadExit(s, err) } if len(addrs) == 0 { - log.Info("wierd. probably ipv6 dns problems") + s = "Your OS is not correctly resolving IPv6 addresses." + argvpb.BadExit(s, errors.New("IPv6 DNS is not returning ip addresses")) } /* s, err = IPv6TestDNS() |
