mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-20 07:21:27 -06:00
9b743d527f
Avoid duplicating the flag description in each command that requires it.
15 lines
447 B
Go
15 lines
447 B
Go
// Copyright 2017 The OPA Authors. All rights reserved.
|
|
// Use of this source code is governed by an Apache2
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"github.com/open-policy-agent/opa/ast"
|
|
"github.com/spf13/pflag"
|
|
)
|
|
|
|
func setMaxErrors(fs *pflag.FlagSet, errLimit *int) {
|
|
fs.IntVarP(errLimit, "max-errors", "m", ast.CompileErrorLimitDefault, "set the number of errors to allow before compilation fails early")
|
|
}
|