Update go dependencies
This commit is contained in:
parent
a858c549d9
commit
f3bde94d68
643 changed files with 14296 additions and 19354 deletions
2
vendor/k8s.io/apimachinery/pkg/util/validation/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/validation/BUILD
generated
vendored
|
|
@ -9,7 +9,6 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["validation_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/validation",
|
||||
library = ":go_default_library",
|
||||
deps = ["//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library"],
|
||||
)
|
||||
|
|
@ -17,7 +16,6 @@ go_test(
|
|||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["validation.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/validation",
|
||||
deps = ["//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library"],
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/validation/field/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/validation/field/BUILD
generated
vendored
|
|
@ -12,7 +12,6 @@ go_test(
|
|||
"errors_test.go",
|
||||
"path_test.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/validation/field",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
|
|
@ -22,7 +21,6 @@ go_library(
|
|||
"errors.go",
|
||||
"path.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/validation/field",
|
||||
deps = [
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||
|
|
|
|||
7
vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go
generated
vendored
7
vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go
generated
vendored
|
|
@ -19,7 +19,6 @@ package field
|
|||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||
|
|
@ -176,11 +175,7 @@ func Invalid(field *Path, value interface{}, detail string) *Error {
|
|||
func NotSupported(field *Path, value interface{}, validValues []string) *Error {
|
||||
detail := ""
|
||||
if validValues != nil && len(validValues) > 0 {
|
||||
quotedValues := make([]string, len(validValues))
|
||||
for i, v := range validValues {
|
||||
quotedValues[i] = strconv.Quote(v)
|
||||
}
|
||||
detail = "supported values: " + strings.Join(quotedValues, ", ")
|
||||
detail = "supported values: " + strings.Join(validValues, ", ")
|
||||
}
|
||||
return &Error{ErrorTypeNotSupported, field.String(), value, detail}
|
||||
}
|
||||
|
|
|
|||
8
vendor/k8s.io/apimachinery/pkg/util/validation/field/errors_test.go
generated
vendored
8
vendor/k8s.io/apimachinery/pkg/util/validation/field/errors_test.go
generated
vendored
|
|
@ -165,11 +165,3 @@ func TestErrListFilter(t *testing.T) {
|
|||
t.Errorf("should filter")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNotSupported(t *testing.T) {
|
||||
notSupported := NotSupported(NewPath("f"), "v", []string{"a", "b", "c"})
|
||||
expected := `Unsupported value: "v": supported values: "a", "b", "c"`
|
||||
if notSupported.ErrorBody() != expected {
|
||||
t.Errorf("Expected: %s\n, but got: %s\n", expected, notSupported.ErrorBody())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue