Pin dependencies and update vendors

This commit is contained in:
Wenjia Zhang
2019-10-23 13:37:36 -07:00
parent 9ead9373f3
commit 660b17d0ae
716 changed files with 32002 additions and 21702 deletions

View File

@@ -5,6 +5,7 @@ go_library(
srcs = [
"doc.go",
"pattern.go",
"readerfactory.go",
"trie.go",
],
importmap = "k8s.io/kubernetes/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities",

View File

@@ -17,6 +17,6 @@ const (
OpConcatN
// OpCapture pops an item and binds it to the variable
OpCapture
// OpEnd is the least postive invalid opcode.
// OpEnd is the least positive invalid opcode.
OpEnd
)

View File

@@ -0,0 +1,20 @@
package utilities
import (
"bytes"
"io"
"io/ioutil"
)
// IOReaderFactory takes in an io.Reader and returns a function that will allow you to create a new reader that begins
// at the start of the stream
func IOReaderFactory(r io.Reader) (func() io.Reader, error) {
b, err := ioutil.ReadAll(r)
if err != nil {
return nil, err
}
return func() io.Reader {
return bytes.NewReader(b)
}, nil
}