Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
chore: 🔧 Changes that do not modify src or test files
Browse files Browse the repository at this point in the history
  • Loading branch information
tarampampam committed Feb 23, 2023
1 parent 2cc71c5 commit 00f7535
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
with: {go-version: 1.19}

- uses: golangci/golangci-lint-action@v3 # Action page: <https://github.com/golangci/golangci-lint-action>
with: {skip-pkg-cache: true, skip-build-cache: true}

goreportcard:
name: Update state on goreportcard.com
Expand Down
8 changes: 3 additions & 5 deletions internal/pkg/http/fileserver/fileserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 00f7535

Please sign in to comment.