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>
This commit is contained in:
Josh Bleecher Snyder 2021-03-13 16:52:16 -08:00
parent 88b8a16089
commit 061a6903a2
32 changed files with 143 additions and 181 deletions

View file

@ -18,6 +18,7 @@ package net
import (
"context"
"errors"
"internal/itoa"
"io"
"os"
"sync"
@ -510,7 +511,7 @@ func (o hostLookupOrder) String() string {
if s, ok := lookupOrderName[o]; ok {
return s
}
return "hostLookupOrder=" + itoa(int(o)) + "??"
return "hostLookupOrder=" + itoa.Itoa(int(o)) + "??"
}
// goLookupHost is the native Go implementation of LookupHost.