Bump AWS libraries to latest
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
20
vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go
generated
vendored
20
vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go
generated
vendored
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -18,7 +19,7 @@ var literalValues = [][]rune{
|
||||
|
||||
func isBoolValue(b []rune) bool {
|
||||
for _, lv := range literalValues {
|
||||
if isLitValue(lv, b) {
|
||||
if isCaselessLitValue(lv, b) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -39,6 +40,21 @@ func isLitValue(want, have []rune) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// isCaselessLitValue is a caseless value comparison, assumes want is already lower-cased for efficiency.
|
||||
func isCaselessLitValue(want, have []rune) bool {
|
||||
if len(have) < len(want) {
|
||||
return false
|
||||
}
|
||||
|
||||
for i := 0; i < len(want); i++ {
|
||||
if want[i] != unicode.ToLower(have[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// isNumberValue will return whether not the leading characters in
|
||||
// a byte slice is a number. A number is delimited by whitespace or
|
||||
// the newline token.
|
||||
@@ -177,7 +193,7 @@ func newValue(t ValueType, base int, raw []rune) (Value, error) {
|
||||
case QuotedStringType:
|
||||
v.str = string(raw[1 : len(raw)-1])
|
||||
case BoolType:
|
||||
v.boolean = runeCompare(v.raw, runesTrue)
|
||||
v.boolean = isCaselessLitValue(runesTrue, v.raw)
|
||||
}
|
||||
|
||||
// issue 2253
|
||||
|
||||
Reference in New Issue
Block a user