mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
make quantity flag work with pflag package
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"testing"
|
||||
|
||||
fuzz "github.com/google/gofuzz"
|
||||
"github.com/spf13/pflag"
|
||||
"speter.net/go/exp/math/dec/inf"
|
||||
)
|
||||
|
||||
@@ -487,3 +488,10 @@ func TestQFlagSet(t *testing.T) {
|
||||
t.Errorf("Unexpected result %v != %v", e, a)
|
||||
}
|
||||
}
|
||||
|
||||
func TestQFlagIsPFlag(t *testing.T) {
|
||||
var pfv pflag.Value = qFlag{}
|
||||
if e, a := "quantity", pfv.Type(); e != a {
|
||||
t.Errorf("Unexpected result %v != %v", e, a)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user