cmd/gitops-pusher: use fmt.Println for errors (#5112)

Signed-off-by: Xe <xe@tailscale.com>
This commit is contained in:
Xe Iaso 2022-07-21 13:02:14 -04:00 committed by GitHub
parent 43f3a969ca
commit 41e60dae80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,8 @@ func main() {
}
if err := applyNewACL(ctx, tailnet, apiKey, *policyFname, controlEtag); err != nil {
log.Fatal(err)
fmt.Println(err)
os.Exit(1)
}
case "test":
@ -87,7 +88,8 @@ func main() {
}
if err := testNewACLs(ctx, tailnet, apiKey, *policyFname); err != nil {
log.Fatal(err)
fmt.Println(err)
os.Exit(1)
}
default:
log.Fatalf("usage: %s [options] <test|apply>", os.Args[0])
@ -191,7 +193,7 @@ func testNewACLs(ctx context.Context, tailnet, apiKey, policyFname string) error
return nil
}
var lineColMessageSplit = regexp.MustCompile(`^line ([0-9]+), column ([0-9]+): (.*)$`)
var lineColMessageSplit = regexp.MustCompile(`line ([0-9]+), column ([0-9]+): (.*)$`)
type ACLTestError struct {
Message string `json:"message"`