Go Package rand

From NovaOrdis Knowledge Base
Revision as of 21:43, 2 October 2023 by Ovidiu (talk | contribs) (→‎Overview)
Jump to navigation Jump to search

Internal

Overview

The package math/rand.

rand.New()

Generating a new random integer:

i := rand.New(rand.NewSource(time.Now().UnixNano())).Int()

rand.NewSource()