Upgrade k8s.io/client-go to version 2
This commit is contained in:
parent
a3b95f798b
commit
6f4c5dd4ce
675 changed files with 109006 additions and 90744 deletions
1501
vendor/golang.org/x/text/language/index.go
generated
vendored
1501
vendor/golang.org/x/text/language/index.go
generated
vendored
File diff suppressed because it is too large
Load diff
2
vendor/golang.org/x/text/language/language.go
generated
vendored
2
vendor/golang.org/x/text/language/language.go
generated
vendored
|
@ -593,7 +593,7 @@ func (t Tag) Extension(x byte) (ext Extension, ok bool) {
|
|||
return Extension{ext}, true
|
||||
}
|
||||
}
|
||||
return Extension{}, false
|
||||
return Extension{string(x)}, false
|
||||
}
|
||||
|
||||
// Extensions returns all extensions of t.
|
||||
|
|
13
vendor/golang.org/x/text/language/maketables.go
generated
vendored
13
vendor/golang.org/x/text/language/maketables.go
generated
vendored
|
@ -678,8 +678,6 @@ func (b *builder) parseIndices() {
|
|||
b.locale.parse(meta.DefaultContent.Locales)
|
||||
}
|
||||
|
||||
// TODO: region inclusion data will probably not be use used in future matchers.
|
||||
|
||||
func (b *builder) computeRegionGroups() {
|
||||
b.groups = make(map[int]index)
|
||||
|
||||
|
@ -688,11 +686,6 @@ func (b *builder) computeRegionGroups() {
|
|||
b.groups[i] = index(len(b.groups))
|
||||
}
|
||||
for _, g := range b.supp.TerritoryContainment.Group {
|
||||
// Skip UN and EURO zone as they are flattening the containment
|
||||
// relationship.
|
||||
if g.Type == "EZ" || g.Type == "UN" {
|
||||
continue
|
||||
}
|
||||
group := b.region.index(g.Type)
|
||||
if _, ok := b.groups[group]; !ok {
|
||||
b.groups[group] = index(len(b.groups))
|
||||
|
@ -789,7 +782,6 @@ func (b *builder) writeLanguage() {
|
|||
lang.updateLater("tw", "twi")
|
||||
lang.updateLater("nb", "nob")
|
||||
lang.updateLater("ak", "aka")
|
||||
lang.updateLater("bh", "bih")
|
||||
|
||||
// Ensure that each 2-letter code is matched with a 3-letter code.
|
||||
for _, v := range lang.s[1:] {
|
||||
|
@ -1490,11 +1482,6 @@ func (b *builder) writeRegionInclusionData() {
|
|||
containment = make(map[index][]index)
|
||||
)
|
||||
for _, g := range b.supp.TerritoryContainment.Group {
|
||||
// Skip UN and EURO zone as they are flattening the containment
|
||||
// relationship.
|
||||
if g.Type == "EZ" || g.Type == "UN" {
|
||||
continue
|
||||
}
|
||||
group := b.region.index(g.Type)
|
||||
groupIdx := b.groups[group]
|
||||
for _, mem := range strings.Split(g.Contains, " ") {
|
||||
|
|
21
vendor/golang.org/x/text/language/match.go
generated
vendored
21
vendor/golang.org/x/text/language/match.go
generated
vendored
|
@ -396,8 +396,8 @@ type matcher struct {
|
|||
// matchHeader has the lists of tags for exact matches and matches based on
|
||||
// maximized and canonicalized tags for a given language.
|
||||
type matchHeader struct {
|
||||
exact []*haveTag
|
||||
max []*haveTag
|
||||
exact []haveTag
|
||||
max []haveTag
|
||||
}
|
||||
|
||||
// haveTag holds a supported Tag and its maximized script and region. The maximized
|
||||
|
@ -457,7 +457,7 @@ func (h *matchHeader) addIfNew(n haveTag, exact bool) {
|
|||
}
|
||||
}
|
||||
if exact {
|
||||
h.exact = append(h.exact, &n)
|
||||
h.exact = append(h.exact, n)
|
||||
}
|
||||
// Allow duplicate maximized tags, but create a linked list to allow quickly
|
||||
// comparing the equivalents and bail out.
|
||||
|
@ -472,7 +472,7 @@ func (h *matchHeader) addIfNew(n haveTag, exact bool) {
|
|||
break
|
||||
}
|
||||
}
|
||||
h.max = append(h.max, &n)
|
||||
h.max = append(h.max, n)
|
||||
}
|
||||
|
||||
// header returns the matchHeader for the given language. It creates one if
|
||||
|
@ -503,7 +503,7 @@ func newMatcher(supported []Tag) *matcher {
|
|||
pair, _ := makeHaveTag(tag, i)
|
||||
m.header(tag.lang).addIfNew(pair, true)
|
||||
}
|
||||
m.default_ = m.header(supported[0].lang).exact[0]
|
||||
m.default_ = &m.header(supported[0].lang).exact[0]
|
||||
for i, tag := range supported {
|
||||
pair, max := makeHaveTag(tag, i)
|
||||
if max != tag.lang {
|
||||
|
@ -520,8 +520,7 @@ func newMatcher(supported []Tag) *matcher {
|
|||
return
|
||||
}
|
||||
hw := m.header(langID(want))
|
||||
for _, ht := range hh.max {
|
||||
v := *ht
|
||||
for _, v := range hh.max {
|
||||
if conf < v.conf {
|
||||
v.conf = conf
|
||||
}
|
||||
|
@ -581,7 +580,7 @@ func (m *matcher) getBest(want ...Tag) (got *haveTag, orig Tag, c Confidence) {
|
|||
continue
|
||||
}
|
||||
for i := range h.exact {
|
||||
have := h.exact[i]
|
||||
have := &h.exact[i]
|
||||
if have.tag.equalsRest(w) {
|
||||
return have, w, Exact
|
||||
}
|
||||
|
@ -592,7 +591,7 @@ func (m *matcher) getBest(want ...Tag) (got *haveTag, orig Tag, c Confidence) {
|
|||
// Base language is not defined.
|
||||
if h != nil {
|
||||
for i := range h.exact {
|
||||
have := h.exact[i]
|
||||
have := &h.exact[i]
|
||||
if have.tag.equalsRest(w) {
|
||||
return have, w, Exact
|
||||
}
|
||||
|
@ -610,11 +609,11 @@ func (m *matcher) getBest(want ...Tag) (got *haveTag, orig Tag, c Confidence) {
|
|||
}
|
||||
// Check for match based on maximized tag.
|
||||
for i := range h.max {
|
||||
have := h.max[i]
|
||||
have := &h.max[i]
|
||||
best.update(have, w, max.script, max.region)
|
||||
if best.conf == Exact {
|
||||
for have.nextMax != 0 {
|
||||
have = h.max[have.nextMax]
|
||||
have = &h.max[have.nextMax]
|
||||
best.update(have, w, max.script, max.region)
|
||||
}
|
||||
return best.have, best.want, High
|
||||
|
|
5044
vendor/golang.org/x/text/language/tables.go
generated
vendored
5044
vendor/golang.org/x/text/language/tables.go
generated
vendored
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue