vendor: update all dependencies except Azure SDK

The Azure SDK doesn't support Go 1.5 anymore. We can't upgrade it until
Go 1.8 comes out.
This commit is contained in:
Felix Lange
2017-01-10 19:33:17 +01:00
parent 02b67558e8
commit d78f9b834a
130 changed files with 14052 additions and 1035 deletions

View File

@ -117,13 +117,7 @@ func (w *CodeWriter) WriteConst(name string, x interface{}) {
switch v.Type().Kind() {
case reflect.String:
// See golang.org/issue/13145.
const arbitraryCutoff = 16
if v.Len() > arbitraryCutoff {
w.printf("var %s %s = ", name, typeName(x))
} else {
w.printf("const %s %s = ", name, typeName(x))
}
w.printf("const %s %s = ", name, typeName(x))
w.WriteString(v.String())
w.printf("\n")
default:
@ -203,16 +197,27 @@ func (w *CodeWriter) WriteString(s string) {
// When starting on its own line, go fmt indents line 2+ an extra level.
n, max := maxWidth, maxWidth-4
// As per https://golang.org/issue/18078, the compiler has trouble
// compiling the concatenation of many strings, s0 + s1 + s2 + ... + sN,
// for large N. We insert redundant, explicit parentheses to work around
// that, lowering the N at any given step: (s0 + s1 + ... + s63) + (s64 +
// ... + s127) + etc + (etc + ... + sN).
explicitParens, extraComment := len(s) > 128*1024, ""
if explicitParens {
w.printf(`(`)
extraComment = "; the redundant, explicit parens are for https://golang.org/issue/18078"
}
// Print "" +\n, if a string does not start on its own line.
b := w.buf.Bytes()
if p := len(bytes.TrimRight(b, " \t")); p > 0 && b[p-1] != '\n' {
w.printf("\"\" + // Size: %d bytes\n", len(s))
w.printf("\"\" + // Size: %d bytes%s\n", len(s), extraComment)
n, max = maxWidth, maxWidth
}
w.printf(`"`)
for sz, p := 0, 0; p < len(s); {
for sz, p, nLines := 0, 0, 0; p < len(s); {
var r rune
r, sz = utf8.DecodeRuneInString(s[p:])
out := s[p : p+sz]
@ -229,6 +234,10 @@ func (w *CodeWriter) WriteString(s string) {
chars = len(out)
}
if n -= chars; n < 0 {
nLines++
if explicitParens && nLines&63 == 63 {
w.printf("\") + (\"")
}
w.printf("\" +\n\"")
n = max - len(out)
}
@ -236,6 +245,9 @@ func (w *CodeWriter) WriteString(s string) {
p += sz
}
w.printf(`"`)
if explicitParens {
w.printf(`)`)
}
}
// WriteSlice writes a slice value.