aboutsummaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2025-11-03 15:35:26 -0500
committerRuss Cox <rsc@golang.org>2025-11-03 16:37:04 -0800
commite2c6a2024c9bdd56786feef42a2e2c5c5adeced2 (patch)
treeb88583fe99d40ef0928dbef97c2b4ed378a22311 /src/internal
parentc93cc603cd5c731d00dc019c94490edca6160841 (diff)
downloadgo-e2c6a2024c9bdd56786feef42a2e2c5c5adeced2.tar.xz
runtime: avoid append in printint, printuint
Should make cmd/link/internal/ld.TestAbstractOriginSanity happier. Change-Id: I121927d42e527ff23d996e7387066f149b11cc59 Reviewed-on: https://go-review.googlesource.com/c/go/+/717480 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/strconv/itoa.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/internal/strconv/itoa.go b/src/internal/strconv/itoa.go
index d06de4770f..2375e034f5 100644
--- a/src/internal/strconv/itoa.go
+++ b/src/internal/strconv/itoa.go
@@ -174,6 +174,14 @@ func small(i int) string {
return smalls[i*2 : i*2+2]
}
+// RuntimeFormatBase10 formats u into the tail of a
+// and returns the offset to the first byte written to a.
+// It is only for use by package runtime.
+// Other packages should use AppendUint.
+func RuntimeFormatBase10(a []byte, u uint64) int {
+ return formatBase10(a, u)
+}
+
// formatBase10 formats the decimal representation of u into the tail of a
// and returns the offset of the first byte written to a. That is, after
//