diff options
| author | Josh Bleecher Snyder <josharian@gmail.com> | 2021-03-13 16:52:16 -0800 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2021-03-14 17:56:50 +0000 |
| commit | 061a6903a232cb868780b1e724a75bf92a728489 (patch) | |
| tree | e8dc88c37a5e79e1aa138dffbeb70439543ee54c /src/syscall/syscall_linux.go | |
| parent | 88b8a1608987d494f3f29618e7524e61712c31ba (diff) | |
| download | go-061a6903a232cb868780b1e724a75bf92a728489.tar.xz | |
all: add internal/itoa package
This replaces five implementations scattered across low level packages.
(And I plan to use it in a sixth soon.)
Three of the five were byte-for-byte identical.
Change-Id: I3bbbeeac63723a487986c912b604e10ad1e042f4
Reviewed-on: https://go-review.googlesource.com/c/go/+/301549
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Diffstat (limited to 'src/syscall/syscall_linux.go')
| -rw-r--r-- | src/syscall/syscall_linux.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/syscall/syscall_linux.go b/src/syscall/syscall_linux.go index 3041f6f8fc..24e051dcbd 100644 --- a/src/syscall/syscall_linux.go +++ b/src/syscall/syscall_linux.go @@ -11,7 +11,10 @@ package syscall -import "unsafe" +import ( + "internal/itoa" + "unsafe" +) func rawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) @@ -225,7 +228,7 @@ func Futimesat(dirfd int, path string, tv []Timeval) (err error) { func Futimes(fd int, tv []Timeval) (err error) { // Believe it or not, this is the best we can do on Linux // (and is what glibc does). - return Utimes("/proc/self/fd/"+itoa(fd), tv) + return Utimes("/proc/self/fd/"+itoa.Itoa(fd), tv) } const ImplementsGetwd = true |
