Skip to content

rand.Seed is deprecated in Go 1.20 #22

Description

@pacoxu

slim-sprig/defaults.go

Lines 13 to 14 in 6e46e2e

rand.Seed(time.Now().UnixNano())
}

rand.Seed is deprecated: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator.deprecateddefault

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions