Go Package rand: Difference between revisions
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
=Overview= | =Overview= | ||
The package <code>math/rand</code>. | |||
=<tt>rand.New()</tt>= | =<tt>rand.New()</tt>= |
Revision as of 21:43, 2 October 2023
Internal
Overview
The package math/rand
.
rand.New()
Generating a new random integer:
i := rand.New(rand.NewSource(time.Now().UnixNano())).Int()