Compare commits

..

No commits in common. "main" and "v1.3.2" have entirely different histories.
main ... v1.3.2

4 changed files with 11 additions and 12 deletions

View File

@ -1,8 +1,5 @@
# CHANGELOG
## v1.5.1 (2026-06-08)
- **JS 对齐**: 将所有注册到 `jsmod` 的导出方法名统一为 PascalCase`Int`, `FastInt`, `Byte`),以消除 JS 与 Go 调用体感上的摩擦。
## v1.5.0 (2026-05-10)
## [Unreleased]
- 优化 `Bytes` 函数,提升随机生成健壮性。
- 完善 `TEST.md` 性能基准报告与功能测试覆盖。

2
go.mod
View File

@ -2,4 +2,4 @@ module apigo.cc/go/rand
go 1.25.0
require apigo.cc/go/jsmod v1.5.0
require apigo.cc/go/jsmod v1.0.0

2
go.sum Normal file
View File

@ -0,0 +1,2 @@
apigo.cc/go/jsmod v1.0.0 h1:lVQMq0tCno4kbHlQ3j5wzsm+v24J+bznIoHxpton0pE=
apigo.cc/go/jsmod v1.0.0/go.mod h1:bmyeZtOAP/j5am+YRnaiM89smysK24K7ebk0koFtsSw=

View File

@ -6,20 +6,20 @@ import (
func init() {
jsmod.Register("rand", map[string]any{
"Int": func(min, max int64) int64 {
"int": func(min, max int64) int64 {
return Int(min, max)
},
"FastInt": func(min, max int64) int64 {
"fastInt": func(min, max int64) int64 {
return FastInt(min, max)
},
"Float": func(min, max float64) float64 {
"float": func(min, max float64) float64 {
return Float(min, max)
},
"FastFloat": func(min, max float64) float64 {
"fastFloat": func(min, max float64) float64 {
return FastFloat(min, max)
},
"Byte": Byte,
"Bytes": Bytes,
"Perm": Perm,
"byte": Byte,
"bytes": Bytes,
"perm": Perm,
})
}