diff options
| author | Michael Pratt <mpratt@google.com> | 2025-05-14 15:53:58 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-05-19 12:46:19 -0700 |
| commit | 76e7bfbb4e3a6114a33c7dba666fdd26698bedc5 (patch) | |
| tree | a3c5738900dba5ff5e40f43ddda7dcb14b9ddae2 /src/runtime/runtime1.go | |
| parent | d93bea0e59e51c2d85e69f28f09726b5c9fc81d2 (diff) | |
| download | go-76e7bfbb4e3a6114a33c7dba666fdd26698bedc5.tar.xz | |
runtime: move atoi to internal/runtime/strconv
Moving to a smaller package allows its use in other internal/runtime
packages.
This isn't internal/strconvlite since it can't be used directly by
strconv.
For #73193.
Change-Id: I6a6a636c9c8b3f06b5fd6c07fe9dd5a7a37d1429
Reviewed-on: https://go-review.googlesource.com/c/go/+/672697
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/runtime1.go')
| -rw-r--r-- | src/runtime/runtime1.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go index 2132ceecb2..5beaa4dd74 100644 --- a/src/runtime/runtime1.go +++ b/src/runtime/runtime1.go @@ -8,6 +8,7 @@ import ( "internal/bytealg" "internal/goarch" "internal/runtime/atomic" + "internal/runtime/strconv" "unsafe" ) @@ -526,13 +527,13 @@ func parsegodebug(godebug string, seen map[string]bool) { // is int, not int32, and should only be updated // if specified in GODEBUG. if seen == nil && key == "memprofilerate" { - if n, ok := atoi(value); ok { + if n, ok := strconv.Atoi(value); ok { MemProfileRate = n } } else { for _, v := range dbgvars { if v.name == key { - if n, ok := atoi32(value); ok { + if n, ok := strconv.Atoi32(value); ok { if seen == nil && v.value != nil { *v.value = n } else if v.atomic != nil { @@ -572,7 +573,7 @@ func setTraceback(level string) { fallthrough default: t = tracebackAll - if n, ok := atoi(level); ok && n == int(uint32(n)) { + if n, ok := strconv.Atoi(level); ok && n == int(uint32(n)) { t |= uint32(n) << tracebackShift } } |
