Remove the global variable used. Allows easier unit testing. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
16 lines
501 B
Go
16 lines
501 B
Go
package command
|
|
|
|
import (
|
|
"github.com/spf13/pflag"
|
|
)
|
|
|
|
// AddTrustVerificationFlags adds content trust flags to the provided flagset
|
|
func AddTrustVerificationFlags(fs *pflag.FlagSet, v *bool, trusted bool) {
|
|
fs.BoolVar(v, "disable-content-trust", !trusted, "Skip image verification")
|
|
}
|
|
|
|
// AddTrustSigningFlags adds "signing" flags to the provided flagset
|
|
func AddTrustSigningFlags(fs *pflag.FlagSet, v *bool, trusted bool) {
|
|
fs.BoolVar(v, "disable-content-trust", !trusted, "Skip image signing")
|
|
}
|