1
0
Fork 0

Upgrade k8s.io/client-go to version 2

This commit is contained in:
Ed Robinson 2017-04-07 11:49:53 +01:00
parent a3b95f798b
commit 6f4c5dd4ce
No known key found for this signature in database
GPG key ID: EC501FCA6421CCF0
675 changed files with 109006 additions and 90744 deletions

View file

@ -19,51 +19,38 @@ var (
OpaqueString *Profile = opaquestring // Implements the OpaqueString profile defined in RFC 7613 for passwords and other secure labels.
)
// TODO: mvl: "Ultimately, I would manually define the structs for the internal
// profiles. This avoid pulling in unneeded tables when they are not used."
var (
nickname = &Profile{
options: getOpts(
AdditionalMapping(func() transform.Transformer {
return &nickAdditionalMapping{}
}),
IgnoreCase,
Norm(norm.NFKC),
DisallowEmpty,
),
class: freeform,
}
usernameCaseMap = &Profile{
options: getOpts(
FoldWidth,
LowerCase(),
Norm(norm.NFC),
BidiRule,
),
class: identifier,
}
usernameNoCaseMap = &Profile{
options: getOpts(
FoldWidth,
Norm(norm.NFC),
BidiRule,
),
class: identifier,
}
opaquestring = &Profile{
options: getOpts(
AdditionalMapping(func() transform.Transformer {
return mapSpaces
}),
Norm(norm.NFC),
DisallowEmpty,
),
class: freeform,
}
nickname = NewFreeform(
AdditionalMapping(func() transform.Transformer {
return &nickAdditionalMapping{}
}),
IgnoreCase,
Norm(norm.NFKC),
DisallowEmpty,
)
usernameCaseMap = NewIdentifier(
FoldWidth,
FoldCase(),
Norm(norm.NFC),
BidiRule,
)
usernameNoCaseMap = NewIdentifier(
FoldWidth,
Norm(norm.NFC),
BidiRule,
)
opaquestring = NewFreeform(
AdditionalMapping(func() transform.Transformer {
return runes.Map(func(r rune) rune {
if unicode.Is(unicode.Zs, r) {
return ' '
}
return r
})
}),
Norm(norm.NFC),
DisallowEmpty,
)
)
// mapSpaces is a shared value of a runes.Map transformer.
var mapSpaces transform.Transformer = runes.Map(func(r rune) rune {
if unicode.Is(unicode.Zs, r) {
return ' '
}
return r
})