diff --git a/Makefile b/Makefile index 911ee6bb..d819f375 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ test: staticcheck: @printf $(COLOR) "Run static check..." - @go install honnef.co/go/tools/cmd/staticcheck@2022.1.3 + @go install honnef.co/go/tools/cmd/staticcheck@latest @staticcheck ./... errcheck: @@ -51,4 +51,3 @@ clean: rm -rf bin ci-build: staticcheck errcheck workflowcheck bins test -GO111MODULE=off go get -u honnef.co/go/tools/cmd/staticcheck \ No newline at end of file diff --git a/go.sum b/go.sum index affaf390..5e6d86f7 100644 --- a/go.sum +++ b/go.sum @@ -2027,6 +2027,7 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= diff --git a/temporal-fixtures/largepayload/activities.go b/temporal-fixtures/largepayload/activities.go index 3061851f..02b7d7a4 100644 --- a/temporal-fixtures/largepayload/activities.go +++ b/temporal-fixtures/largepayload/activities.go @@ -2,7 +2,7 @@ package largepayload import ( "context" - "math/rand" + "crypto/rand" "go.temporal.io/sdk/activity" ) @@ -19,8 +19,8 @@ func (a *Activities) CreateLargeResultActivity(ctx context.Context, sizeBytes in logger.Info("Creating large result payload...", sizeBytes) token := make([]byte, sizeBytes) - rand.Read(token) - return token, nil + _, err := rand.Read(token) + return token, err } func (a *Activities) ProcessLargeInputActivity(ctx context.Context, input []byte) error { diff --git a/temporal-fixtures/largepayload/starter/main.go b/temporal-fixtures/largepayload/starter/main.go index 200b7713..61ea8d05 100644 --- a/temporal-fixtures/largepayload/starter/main.go +++ b/temporal-fixtures/largepayload/starter/main.go @@ -2,8 +2,8 @@ package main import ( "context" + "crypto/rand" "log" - "math/rand" "strconv" "github.com/pborman/uuid" @@ -29,7 +29,7 @@ func main() { id := uuid.New()[0:4] memoToken := make([]byte, PayloadSize) - rand.Read(memoToken) + _, _ = rand.Read(memoToken) i := 1 for i <= NumberOfWorkflows {