diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d622d34..adae920 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,6 +33,7 @@ jobs: with: {go-version: 1.19} - uses: golangci/golangci-lint-action@v3 # Action page: + with: {skip-pkg-cache: true, skip-build-cache: true} goreportcard: name: Update state on goreportcard.com diff --git a/internal/pkg/http/fileserver/fileserver_test.go b/internal/pkg/http/fileserver/fileserver_test.go index 4d2c728..e0976b4 100644 --- a/internal/pkg/http/fileserver/fileserver_test.go +++ b/internal/pkg/http/fileserver/fileserver_test.go @@ -12,18 +12,16 @@ import ( "github.com/stretchr/testify/assert" ) -func init() { //nolint:gochecknoinits - rand.Seed(time.Now().UnixNano()) -} - var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") //nolint:gochecknoglobals func RandStringRunes(t *testing.T, n int) string { t.Helper() + rnd := rand.New(rand.NewSource(time.Now().UnixNano())) //nolint:gosec + b := make([]rune, n) for i := range b { - b[i] = letterRunes[rand.Intn(len(letterRunes))] //nolint:gosec + b[i] = letterRunes[rnd.Intn(len(letterRunes))] } return string(b)