Update vendor/

This commit is contained in:
2018-06-28 01:09:56 +01:00
parent 3e5ab5bb0a
commit 21c6e571d8
108 changed files with 121110 additions and 1144 deletions

View File

@@ -4,14 +4,9 @@ import (
"unicode/utf16"
"unicode/utf8"
"golang.org/x/text/encoding"
"golang.org/x/text/transform"
)
var Encoder = &encoding.Encoder{
Transformer: &encoder{},
}
type encoder struct{}
func (e *encoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
@@ -81,9 +76,9 @@ func encode(s []byte) []byte {
}
// Encode as base64
n := enc.EncodedLen(len(b)) + 2
n := b64Enc.EncodedLen(len(b)) + 2
b64 := make([]byte, n)
enc.Encode(b64[1:], b)
b64Enc.Encode(b64[1:], b)
// Strip padding
n -= 2 - (len(b)+2)%3