Handle rand deprecations in go 1.20

Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
(cherry picked from commit 1a3e73cb84)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
James Hewitt
2023-08-27 11:06:16 +01:00
committed by Sebastiaan van Stijn
parent 29b8ba0b93
commit 31f5cd4865
7 changed files with 11 additions and 9 deletions

View File

@@ -9,7 +9,6 @@ import (
"reflect"
"strings"
"testing"
"time"
"github.com/gorilla/mux"
)
@@ -218,7 +217,6 @@ func TestRouterWithBadCharacters(t *testing.T) {
// with random UTF8 characters not in the 128 bit ASCII range.
// These are not valid characters for the router and we expect
// 404s on every test.
rand.Seed(time.Now().UTC().UnixNano())
testCases := make([]routeTestCase, 1000)
for idx := range testCases {
testCases[idx] = routeTestCase{