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/cache/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/cache/BUILD
generated
vendored
|
|
@ -12,7 +12,6 @@ go_test(
|
|||
"cache_test.go",
|
||||
"lruexpirecache_test.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/cache",
|
||||
library = ":go_default_library",
|
||||
deps = [
|
||||
"//vendor/github.com/golang/groupcache/lru:go_default_library",
|
||||
|
|
@ -26,7 +25,6 @@ go_library(
|
|||
"cache.go",
|
||||
"lruexpirecache.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/cache",
|
||||
deps = ["//vendor/github.com/hashicorp/golang-lru:go_default_library"],
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/clock/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/clock/BUILD
generated
vendored
|
|
@ -9,14 +9,12 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["clock_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/clock",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["clock.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/clock",
|
||||
)
|
||||
|
||||
filegroup(
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/diff/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/diff/BUILD
generated
vendored
|
|
@ -9,14 +9,12 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["diff_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/diff",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["diff.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/diff",
|
||||
deps = [
|
||||
"//vendor/github.com/davecgh/go-spew/spew:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||
|
|
|
|||
11
vendor/k8s.io/apimachinery/pkg/util/diff/diff.go
generated
vendored
11
vendor/k8s.io/apimachinery/pkg/util/diff/diff.go
generated
vendored
|
|
@ -142,6 +142,10 @@ func objectReflectDiff(path *field.Path, a, b reflect.Value) []diff {
|
|||
}
|
||||
if sub := objectReflectDiff(path.Child(a.Type().Field(i).Name), a.Field(i), b.Field(i)); len(sub) > 0 {
|
||||
changes = append(changes, sub...)
|
||||
} else {
|
||||
if !reflect.DeepEqual(a.Field(i).Interface(), b.Field(i).Interface()) {
|
||||
changes = append(changes, diff{path: path, a: a.Field(i).Interface(), b: b.Field(i).Interface()})
|
||||
}
|
||||
}
|
||||
}
|
||||
return changes
|
||||
|
|
@ -174,18 +178,21 @@ func objectReflectDiff(path *field.Path, a, b reflect.Value) []diff {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
var diffs []diff
|
||||
for i := 0; i < l; i++ {
|
||||
if !reflect.DeepEqual(a.Index(i), b.Index(i)) {
|
||||
diffs = append(diffs, objectReflectDiff(path.Index(i), a.Index(i), b.Index(i))...)
|
||||
return objectReflectDiff(path.Index(i), a.Index(i), b.Index(i))
|
||||
}
|
||||
}
|
||||
var diffs []diff
|
||||
for i := l; i < lA; i++ {
|
||||
diffs = append(diffs, diff{path: path.Index(i), a: a.Index(i), b: nil})
|
||||
}
|
||||
for i := l; i < lB; i++ {
|
||||
diffs = append(diffs, diff{path: path.Index(i), a: nil, b: b.Index(i)})
|
||||
}
|
||||
if len(diffs) == 0 {
|
||||
diffs = append(diffs, diff{path: path, a: a, b: b})
|
||||
}
|
||||
return diffs
|
||||
case reflect.Map:
|
||||
if reflect.DeepEqual(a.Interface(), b.Interface()) {
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/errors/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/errors/BUILD
generated
vendored
|
|
@ -9,7 +9,6 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["errors_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/errors",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
|
|
@ -19,7 +18,6 @@ go_library(
|
|||
"doc.go",
|
||||
"errors.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/errors",
|
||||
)
|
||||
|
||||
filegroup(
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/framer/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/framer/BUILD
generated
vendored
|
|
@ -9,14 +9,12 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["framer_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/framer",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["framer.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/framer",
|
||||
)
|
||||
|
||||
filegroup(
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/httpstream/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/httpstream/BUILD
generated
vendored
|
|
@ -9,7 +9,6 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["httpstream_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/httpstream",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
|
|
@ -19,7 +18,6 @@ go_library(
|
|||
"doc.go",
|
||||
"httpstream.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/httpstream",
|
||||
)
|
||||
|
||||
filegroup(
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD
generated
vendored
|
|
@ -13,7 +13,6 @@ go_test(
|
|||
"roundtripper_test.go",
|
||||
"upgrade_test.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/httpstream/spdy",
|
||||
library = ":go_default_library",
|
||||
deps = [
|
||||
"//vendor/github.com/elazarl/goproxy:go_default_library",
|
||||
|
|
@ -28,7 +27,6 @@ go_library(
|
|||
"roundtripper.go",
|
||||
"upgrade.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/httpstream/spdy",
|
||||
deps = [
|
||||
"//vendor/github.com/docker/spdystream:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/intstr/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/intstr/BUILD
generated
vendored
|
|
@ -9,7 +9,6 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["intstr_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/intstr",
|
||||
library = ":go_default_library",
|
||||
deps = ["//vendor/github.com/ghodss/yaml:go_default_library"],
|
||||
)
|
||||
|
|
@ -20,7 +19,6 @@ go_library(
|
|||
"generated.pb.go",
|
||||
"intstr.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/intstr",
|
||||
deps = [
|
||||
"//vendor/github.com/go-openapi/spec:go_default_library",
|
||||
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/json/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/json/BUILD
generated
vendored
|
|
@ -9,13 +9,11 @@ load(
|
|||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["json.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/json",
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["json_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/json",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/mergepatch/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/mergepatch/BUILD
generated
vendored
|
|
@ -9,7 +9,6 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["util_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/mergepatch",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
|
|
@ -19,7 +18,6 @@ go_library(
|
|||
"errors.go",
|
||||
"util.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/mergepatch",
|
||||
deps = [
|
||||
"//vendor/github.com/davecgh/go-spew/spew:go_default_library",
|
||||
"//vendor/github.com/ghodss/yaml:go_default_library",
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/net/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/net/BUILD
generated
vendored
|
|
@ -15,7 +15,6 @@ go_test(
|
|||
"port_split_test.go",
|
||||
"util_test.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/net",
|
||||
library = ":go_default_library",
|
||||
deps = ["//vendor/github.com/spf13/pflag:go_default_library"],
|
||||
)
|
||||
|
|
@ -29,7 +28,6 @@ go_library(
|
|||
"port_split.go",
|
||||
"util.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/net",
|
||||
deps = [
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/golang.org/x/net/http2:go_default_library",
|
||||
|
|
|
|||
5
vendor/k8s.io/apimachinery/pkg/util/net/http.go
generated
vendored
5
vendor/k8s.io/apimachinery/pkg/util/net/http.go
generated
vendored
|
|
@ -256,11 +256,8 @@ func isDefault(transportProxier func(*http.Request) (*url.URL, error)) bool {
|
|||
// NewProxierWithNoProxyCIDR constructs a Proxier function that respects CIDRs in NO_PROXY and delegates if
|
||||
// no matching CIDRs are found
|
||||
func NewProxierWithNoProxyCIDR(delegate func(req *http.Request) (*url.URL, error)) func(req *http.Request) (*url.URL, error) {
|
||||
// we wrap the default method, so we only need to perform our check if the NO_PROXY (or no_proxy) envvar has a CIDR in it
|
||||
// we wrap the default method, so we only need to perform our check if the NO_PROXY envvar has a CIDR in it
|
||||
noProxyEnv := os.Getenv("NO_PROXY")
|
||||
if noProxyEnv == "" {
|
||||
noProxyEnv = os.Getenv("no_proxy")
|
||||
}
|
||||
noProxyRules := strings.Split(noProxyEnv, ",")
|
||||
|
||||
cidrs := []*net.IPNet{}
|
||||
|
|
|
|||
31
vendor/k8s.io/apimachinery/pkg/util/rand/BUILD
generated
vendored
Normal file
31
vendor/k8s.io/apimachinery/pkg/util/rand/BUILD
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
"go_test",
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["rand_test.go"],
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["rand.go"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
)
|
||||
95
vendor/k8s.io/apimachinery/pkg/util/rand/rand.go
generated
vendored
Normal file
95
vendor/k8s.io/apimachinery/pkg/util/rand/rand.go
generated
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
Copyright 2015 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Package rand provides utilities related to randomization.
|
||||
package rand
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
var rng = struct {
|
||||
sync.Mutex
|
||||
rand *rand.Rand
|
||||
}{
|
||||
rand: rand.New(rand.NewSource(time.Now().UTC().UnixNano())),
|
||||
}
|
||||
|
||||
// Intn generates an integer in range [0,max).
|
||||
// By design this should panic if input is invalid, <= 0.
|
||||
func Intn(max int) int {
|
||||
rng.Lock()
|
||||
defer rng.Unlock()
|
||||
return rng.rand.Intn(max)
|
||||
}
|
||||
|
||||
// IntnRange generates an integer in range [min,max).
|
||||
// By design this should panic if input is invalid, <= 0.
|
||||
func IntnRange(min, max int) int {
|
||||
rng.Lock()
|
||||
defer rng.Unlock()
|
||||
return rng.rand.Intn(max-min) + min
|
||||
}
|
||||
|
||||
// IntnRange generates an int64 integer in range [min,max).
|
||||
// By design this should panic if input is invalid, <= 0.
|
||||
func Int63nRange(min, max int64) int64 {
|
||||
rng.Lock()
|
||||
defer rng.Unlock()
|
||||
return rng.rand.Int63n(max-min) + min
|
||||
}
|
||||
|
||||
// Seed seeds the rng with the provided seed.
|
||||
func Seed(seed int64) {
|
||||
rng.Lock()
|
||||
defer rng.Unlock()
|
||||
|
||||
rng.rand = rand.New(rand.NewSource(seed))
|
||||
}
|
||||
|
||||
// Perm returns, as a slice of n ints, a pseudo-random permutation of the integers [0,n)
|
||||
// from the default Source.
|
||||
func Perm(n int) []int {
|
||||
rng.Lock()
|
||||
defer rng.Unlock()
|
||||
return rng.rand.Perm(n)
|
||||
}
|
||||
|
||||
// We omit vowels from the set of available characters to reduce the chances
|
||||
// of "bad words" being formed.
|
||||
var alphanums = []rune("bcdfghjklmnpqrstvwxz2456789")
|
||||
|
||||
// String generates a random alphanumeric string, without vowels, which is n
|
||||
// characters long. This will panic if n is less than zero.
|
||||
func String(length int) string {
|
||||
b := make([]rune, length)
|
||||
for i := range b {
|
||||
b[i] = alphanums[Intn(len(alphanums))]
|
||||
}
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// SafeEncodeString encodes s using the same characters as rand.String. This reduces the chances of bad words and
|
||||
// ensures that strings generated from hash functions appear consistent throughout the API.
|
||||
func SafeEncodeString(s string) string {
|
||||
r := make([]rune, len(s))
|
||||
for i, b := range []rune(s) {
|
||||
r[i] = alphanums[(int(b) % len(alphanums))]
|
||||
}
|
||||
return string(r)
|
||||
}
|
||||
101
vendor/k8s.io/apimachinery/pkg/util/rand/rand_test.go
generated
vendored
Normal file
101
vendor/k8s.io/apimachinery/pkg/util/rand/rand_test.go
generated
vendored
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
Copyright 2015 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package rand
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
const (
|
||||
maxRangeTestCount = 500
|
||||
)
|
||||
|
||||
func TestString(t *testing.T) {
|
||||
valid := "0123456789abcdefghijklmnopqrstuvwxyz"
|
||||
for _, l := range []int{0, 1, 2, 10, 123} {
|
||||
s := String(l)
|
||||
if len(s) != l {
|
||||
t.Errorf("expected string of size %d, got %q", l, s)
|
||||
}
|
||||
for _, c := range s {
|
||||
if !strings.ContainsRune(valid, c) {
|
||||
t.Errorf("expected valid charaters, got %v", c)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Confirm that panic occurs on invalid input.
|
||||
func TestRangePanic(t *testing.T) {
|
||||
defer func() {
|
||||
if err := recover(); err == nil {
|
||||
t.Errorf("Panic didn't occur!")
|
||||
}
|
||||
}()
|
||||
// Should result in an error...
|
||||
Intn(0)
|
||||
}
|
||||
|
||||
func TestIntn(t *testing.T) {
|
||||
// 0 is invalid.
|
||||
for _, max := range []int{1, 2, 10, 123} {
|
||||
inrange := Intn(max)
|
||||
if inrange < 0 || inrange > max {
|
||||
t.Errorf("%v out of range (0,%v)", inrange, max)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestPerm(t *testing.T) {
|
||||
Seed(5)
|
||||
rand.Seed(5)
|
||||
for i := 1; i < 20; i++ {
|
||||
actual := Perm(i)
|
||||
expected := rand.Perm(i)
|
||||
for j := 0; j < i; j++ {
|
||||
if actual[j] != expected[j] {
|
||||
t.Errorf("Perm call result is unexpected")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestIntnRange(t *testing.T) {
|
||||
// 0 is invalid.
|
||||
for min, max := range map[int]int{1: 2, 10: 123, 100: 500} {
|
||||
for i := 0; i < maxRangeTestCount; i++ {
|
||||
inrange := IntnRange(min, max)
|
||||
if inrange < min || inrange >= max {
|
||||
t.Errorf("%v out of range (%v,%v)", inrange, min, max)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestInt63nRange(t *testing.T) {
|
||||
// 0 is invalid.
|
||||
for min, max := range map[int64]int64{1: 2, 10: 123, 100: 500} {
|
||||
for i := 0; i < maxRangeTestCount; i++ {
|
||||
inrange := Int63nRange(min, max)
|
||||
if inrange < min || inrange >= max {
|
||||
t.Errorf("%v out of range (%v,%v)", inrange, min, max)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
vendor/k8s.io/apimachinery/pkg/util/remotecommand/BUILD
generated
vendored
1
vendor/k8s.io/apimachinery/pkg/util/remotecommand/BUILD
generated
vendored
|
|
@ -8,7 +8,6 @@ load(
|
|||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["constants.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/remotecommand",
|
||||
deps = ["//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"],
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/runtime/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/runtime/BUILD
generated
vendored
|
|
@ -9,14 +9,12 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["runtime_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/runtime",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["runtime.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/runtime",
|
||||
deps = ["//vendor/github.com/golang/glog:go_default_library"],
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/sets/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/sets/BUILD
generated
vendored
|
|
@ -17,7 +17,6 @@ go_library(
|
|||
"int64.go",
|
||||
"string.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/sets",
|
||||
)
|
||||
|
||||
go_genrule(
|
||||
|
|
@ -51,7 +50,6 @@ $(location //vendor/k8s.io/code-generator/cmd/set-gen) \
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["set_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/sets",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/strategicpatch/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/strategicpatch/BUILD
generated
vendored
|
|
@ -9,7 +9,6 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["patch_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/strategicpatch",
|
||||
library = ":go_default_library",
|
||||
deps = [
|
||||
"//vendor/github.com/davecgh/go-spew/spew:go_default_library",
|
||||
|
|
@ -23,7 +22,6 @@ go_test(
|
|||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["patch.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/strategicpatch",
|
||||
deps = [
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/mergepatch:go_default_library",
|
||||
|
|
|
|||
1
vendor/k8s.io/apimachinery/pkg/util/uuid/BUILD
generated
vendored
1
vendor/k8s.io/apimachinery/pkg/util/uuid/BUILD
generated
vendored
|
|
@ -8,7 +8,6 @@ load(
|
|||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["uuid.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/uuid",
|
||||
deps = [
|
||||
"//vendor/github.com/pborman/uuid:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
|
|
|
|||
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())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/wait/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/wait/BUILD
generated
vendored
|
|
@ -9,7 +9,6 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["wait_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/wait",
|
||||
library = ":go_default_library",
|
||||
deps = ["//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library"],
|
||||
)
|
||||
|
|
@ -20,7 +19,6 @@ go_library(
|
|||
"doc.go",
|
||||
"wait.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/wait",
|
||||
deps = ["//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library"],
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/apimachinery/pkg/util/yaml/BUILD
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/yaml/BUILD
generated
vendored
|
|
@ -9,14 +9,12 @@ load(
|
|||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["decoder_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/yaml",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["decoder.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/util/yaml",
|
||||
deps = [
|
||||
"//vendor/github.com/ghodss/yaml:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue