Update aws-sdk-go dependency to v1.28.2

This commit is contained in:
Sri Saran Balaji Vellore Rajakumar
2020-01-16 19:22:14 -08:00
parent 90d6484f1c
commit a94346bef9
137 changed files with 43354 additions and 5454 deletions

View File

@@ -2,7 +2,11 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["locked_source.go"],
srcs = [
"locked_source.go",
"read.go",
"read_1_5.go",
],
importmap = "k8s.io/kubernetes/vendor/github.com/aws/aws-sdk-go/internal/sdkrand",
importpath = "github.com/aws/aws-sdk-go/internal/sdkrand",
visibility = ["//vendor/github.com/aws/aws-sdk-go:__subpackages__"],

View File

@@ -0,0 +1,11 @@
// +build go1.6
package sdkrand
import "math/rand"
// Read provides the stub for math.Rand.Read method support for go version's
// 1.6 and greater.
func Read(r *rand.Rand, p []byte) (int, error) {
return r.Read(p)
}

View File

@@ -0,0 +1,24 @@
// +build !go1.6
package sdkrand
import "math/rand"
// Read backfills Go 1.6's math.Rand.Reader for Go 1.5
func Read(r *rand.Rand, p []byte) (n int, err error) {
// Copy of Go standard libraries math package's read function not added to
// standard library until Go 1.6.
var pos int8
var val int64
for n = 0; n < len(p); n++ {
if pos == 0 {
val = r.Int63()
pos = 7
}
p[n] = byte(val)
val >>= 8
pos--
}
return n, err
}