aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime1.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2025-10-28 21:54:33 -0400
committerRuss Cox <rsc@golang.org>2025-10-29 11:00:09 -0700
commit49c1da474d68045458b9462b743e3f0f7dcefdfb (patch)
treeb44ac2cf3b548dd2e4bc3ab067614408ad0694eb /src/runtime/runtime1.go
parentb2a346bbd1e1e9cb069001cf86ef39b0dd5722f8 (diff)
downloadgo-49c1da474d68045458b9462b743e3f0f7dcefdfb.tar.xz
internal/itoa, internal/runtime/strconv: delete
Replaced by internal/strconv. Change-Id: I0656a9ad5075e60339e963fbae7d194d2f3e16be Reviewed-on: https://go-review.googlesource.com/c/go/+/716001 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/runtime1.go')
-rw-r--r--src/runtime/runtime1.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go
index 15b546783b..3ec5c44ebd 100644
--- a/src/runtime/runtime1.go
+++ b/src/runtime/runtime1.go
@@ -8,7 +8,7 @@ import (
"internal/bytealg"
"internal/goarch"
"internal/runtime/atomic"
- "internal/runtime/strconv"
+ "internal/strconv"
"unsafe"
)
@@ -532,17 +532,17 @@ 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 := strconv.Atoi(value); ok {
+ if n, err := strconv.Atoi(value); err == nil {
MemProfileRate = n
}
} else {
for _, v := range dbgvars {
if v.name == key {
- if n, ok := strconv.Atoi32(value); ok {
+ if n, err := strconv.ParseInt(value, 10, 32); err == nil {
if seen == nil && v.value != nil {
- *v.value = n
+ *v.value = int32(n)
} else if v.atomic != nil {
- v.atomic.Store(n)
+ v.atomic.Store(int32(n))
}
}
}
@@ -578,7 +578,7 @@ func setTraceback(level string) {
fallthrough
default:
t = tracebackAll
- if n, ok := strconv.Atoi(level); ok && n == int(uint32(n)) {
+ if n, err := strconv.Atoi(level); err == nil && n == int(uint32(n)) {
t |= uint32(n) << tracebackShift
}
}