Skip to content

Commit

Permalink
Validate options in main.go
Browse files Browse the repository at this point in the history
Signed-off-by: Connor Catlett <[email protected]>
  • Loading branch information
ConnorJC3 committed Apr 19, 2024
1 parent 88e1b6b commit 1ba86c8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ func main() {
options.AddFlags(fs)

if err = fs.Parse(args); err != nil {
panic(err)
klog.ErrorS(err, "Failed to parse options")
klog.FlushAndExit(klog.ExitFlushTimeout, 0)
}
if err = o.Validate(); err != nil {

Check failure on line 95 in cmd/main.go

View workflow job for this annotation

GitHub Actions / buildx (ubuntu-latest)

undefined: o

Check failure on line 95 in cmd/main.go

View workflow job for this annotation

GitHub Actions / Generate PR Coverage

undefined: o
klog.ErrorS(err, "Invalid options")
klog.FlushAndExit(klog.ExitFlushTimeout, 0)
}

err = logsapi.ValidateAndApply(c, featureGate)
Expand Down

0 comments on commit 1ba86c8

Please sign in to comment.