From c8dcd048708b8090d4a09d6a35a4b803268dbb40 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Mon, 2 Jan 2017 21:57:10 -0800 Subject: removing old deps --- .../vendor/github.com/nilslice/rand/README.md | 2 -- cmd/ponzu/vendor/github.com/nilslice/rand/rand.go | 38 ---------------------- 2 files changed, 40 deletions(-) delete mode 100644 cmd/ponzu/vendor/github.com/nilslice/rand/README.md delete mode 100644 cmd/ponzu/vendor/github.com/nilslice/rand/rand.go (limited to 'cmd') diff --git a/cmd/ponzu/vendor/github.com/nilslice/rand/README.md b/cmd/ponzu/vendor/github.com/nilslice/rand/README.md deleted file mode 100644 index 89cc36d..0000000 --- a/cmd/ponzu/vendor/github.com/nilslice/rand/README.md +++ /dev/null @@ -1,2 +0,0 @@ -rand provides a convenient package to use crypto/rand as default -but falls back to math/rand if necessary \ No newline at end of file diff --git a/cmd/ponzu/vendor/github.com/nilslice/rand/rand.go b/cmd/ponzu/vendor/github.com/nilslice/rand/rand.go deleted file mode 100644 index cbff54a..0000000 --- a/cmd/ponzu/vendor/github.com/nilslice/rand/rand.go +++ /dev/null @@ -1,38 +0,0 @@ -// rand provides a convenient package to use crypto/rand as default -// but falls back to math/rand if necessary -package rand - -import ( - crand "crypto/rand" - mrand "math/rand" - "time" -) - -var g_mathRand = mrand.New(mrand.NewSource(time.Now().Unix())) - -// Read fills the slice with random bytes -func Read(xs []byte) { - length := len(xs) - n, err := crand.Read(xs) - if n != length || err != nil { - for length > 0 { - length-- - xs[length] = byte(g_mathRand.Int31n(256)) - } - } -} - -// Int63 returns a non-negative 63-bit integer as an int64 -func Int63() int64 { - xs := make([]byte, 8) - var n int64 - - Read(xs) - xs[0] &= 0x7F - for _, x := range xs { - n <<= 4 - n |= int64(x) - } - - return n -} -- cgit v1.2.3