mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-11-06 05:17:08 +00:00
Fix flagged lint
This commit is contained in:
1 file changed
+5
-6
+5
-6
@@ -20,7 +20,6 @@ import (
|
||||
"testing"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
"k8s.io/utils/ptr"
|
||||
)
|
||||
|
||||
func Test(t *testing.T) {
|
||||
@@ -53,13 +52,13 @@ func Test(t *testing.T) {
|
||||
|
||||
st.Value(&Struct{
|
||||
StringField: "abc",
|
||||
StringPtrField: ptr.To("xyz"),
|
||||
StringPtrField: new("xyz"),
|
||||
StringTypedefField: StringType("abc"),
|
||||
StringTypedefPtrField: ptr.To(StringType("xyz")),
|
||||
StringTypedefPtrField: new(StringType("xyz")),
|
||||
IntField: 123,
|
||||
IntPtrField: ptr.To(456),
|
||||
IntPtrField: new(456),
|
||||
IntTypedefField: IntType(123),
|
||||
IntTypedefPtrField: ptr.To(IntType(456)),
|
||||
IntTypedefPtrField: new(IntType(456)),
|
||||
BoolField: true,
|
||||
FloatField: 1.23,
|
||||
ByteField: 'a',
|
||||
@@ -95,7 +94,7 @@ func TestPayload(t *testing.T) {
|
||||
|
||||
st.Value(&PayloadStruct{
|
||||
StringField: "abc",
|
||||
StringPtrField: ptr.To("xyz"),
|
||||
StringPtrField: new("xyz"),
|
||||
SliceField: []string{"a"},
|
||||
MapField: map[string]string{"a": "b"},
|
||||
}).ExpectMatches(field.ErrorMatcher{}.ByType().ByField().ByDetailExact(), field.ErrorList{
|
||||
|
||||
Reference in new issue
Block a user