Skip to content

[cleanup] Math/rand.Seed deprecated #2650

@n4x2

Description

@n4x2

Summary

Since Go 1.20 release, math/rand.Seed is marked "Deprecated"

Looks like five instances to consider updating:

find . -name "*.go" -type f -print | xargs grep .Seed
./pkg/pwgen/pwgen_test.go:      mrand.Seed(1789)
./pkg/pwgen/rand.go:    rand.Seed(time.Now().Unix() + int64(os.Getpid()+os.Getppid()))
./pkg/fsutil/fsutil.go: rand.Seed(time.Now().UnixNano())
./pkg/gitconfig/config_test.go: rand.Seed(time.Now().Unix())
./internal/action/binary_test.go:       rand.Seed(42)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions