diff options
author | Russ Cox <rsc@golang.org> | 2023-08-05 23:49:01 -0400 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-10-30 14:29:37 +0000 |
commit | d42750b17c17fb1c3241b74c7ba2af96dff10195 (patch) | |
tree | 8b1e33dfc62b0f1f919f4141030cd08cb216b235 /api | |
parent | 59f0ab40369e4f05276aa2afe20a74beb78aa0b0 (diff) | |
download | go-d42750b17c17fb1c3241b74c7ba2af96dff10195.tar.gz go-d42750b17c17fb1c3241b74c7ba2af96dff10195.zip |
math/rand/v2: rename various functions
Int31 -> Int32
Int31n -> Int32N
Int63 -> Int64
Int63n -> Int64N
Intn -> IntN
The 31 and 63 are pedantic and confusing: the functions should
be named for the type they return, same as all the others.
The lower-case n is inconsistent with Go's usual CamelCase
and especially problematic because we plan to add 'func N'.
Capitalize the n.
For #61716.
Change-Id: Idb1a005a82f353677450d47fb612ade7a41fde69
Reviewed-on: https://go-review.googlesource.com/c/go/+/516857
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/next/61716.txt | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/api/next/61716.txt b/api/next/61716.txt index d552934c43..36252ab50d 100644 --- a/api/next/61716.txt +++ b/api/next/61716.txt @@ -2,11 +2,11 @@ pkg math/rand/v2, func ExpFloat64() float64 #61716 pkg math/rand/v2, func Float32() float32 #61716 pkg math/rand/v2, func Float64() float64 #61716 pkg math/rand/v2, func Int() int #61716 -pkg math/rand/v2, func Int31() int32 #61716 -pkg math/rand/v2, func Int31n(int32) int32 #61716 -pkg math/rand/v2, func Int63() int64 #61716 -pkg math/rand/v2, func Int63n(int64) int64 #61716 -pkg math/rand/v2, func Intn(int) int #61716 +pkg math/rand/v2, func Int32() int32 #61716 +pkg math/rand/v2, func Int32N(int32) int32 #61716 +pkg math/rand/v2, func Int64() int64 #61716 +pkg math/rand/v2, func Int64N(int64) int64 #61716 +pkg math/rand/v2, func IntN(int) int #61716 pkg math/rand/v2, func New(Source) *Rand #61716 pkg math/rand/v2, func NewSource(int64) Source #61716 pkg math/rand/v2, func NewZipf(*Rand, float64, float64, uint64) *Zipf #61716 @@ -23,11 +23,11 @@ pkg math/rand/v2, method (*Rand) ExpFloat64() float64 #61716 pkg math/rand/v2, method (*Rand) Float32() float32 #61716 pkg math/rand/v2, method (*Rand) Float64() float64 #61716 pkg math/rand/v2, method (*Rand) Int() int #61716 -pkg math/rand/v2, method (*Rand) Int31() int32 #61716 -pkg math/rand/v2, method (*Rand) Int31n(int32) int32 #61716 -pkg math/rand/v2, method (*Rand) Int63() int64 #61716 -pkg math/rand/v2, method (*Rand) Int63n(int64) int64 #61716 -pkg math/rand/v2, method (*Rand) Intn(int) int #61716 +pkg math/rand/v2, method (*Rand) Int32() int32 #61716 +pkg math/rand/v2, method (*Rand) Int32N(int32) int32 #61716 +pkg math/rand/v2, method (*Rand) Int64() int64 #61716 +pkg math/rand/v2, method (*Rand) Int64N(int64) int64 #61716 +pkg math/rand/v2, method (*Rand) IntN(int) int #61716 pkg math/rand/v2, method (*Rand) NormFloat64() float64 #61716 pkg math/rand/v2, method (*Rand) Perm(int) []int #61716 pkg math/rand/v2, method (*Rand) Read([]uint8) (int, error) #61716 @@ -37,11 +37,11 @@ pkg math/rand/v2, method (*Rand) Uint32() uint32 #61716 pkg math/rand/v2, method (*Rand) Uint64() uint64 #61716 pkg math/rand/v2, method (*Zipf) Uint64() uint64 #61716 pkg math/rand/v2, type Rand struct #61716 -pkg math/rand/v2, type Source interface { Int63, Seed } #61716 -pkg math/rand/v2, type Source interface, Int63() int64 #61716 +pkg math/rand/v2, type Source interface { Int64, Seed } #61716 +pkg math/rand/v2, type Source interface, Int64() int64 #61716 pkg math/rand/v2, type Source interface, Seed(int64) #61716 -pkg math/rand/v2, type Source64 interface { Int63, Seed, Uint64 } #61716 -pkg math/rand/v2, type Source64 interface, Int63() int64 #61716 +pkg math/rand/v2, type Source64 interface { Int64, Seed, Uint64 } #61716 +pkg math/rand/v2, type Source64 interface, Int64() int64 #61716 pkg math/rand/v2, type Source64 interface, Seed(int64) #61716 pkg math/rand/v2, type Source64 interface, Uint64() uint64 #61716 pkg math/rand/v2, type Zipf struct #61716 |