aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/hex
AgeCommit message (Collapse)Author
2026-03-30encoding/hex: speed up DecodeJulien Cretel
This CL eliminates the remaining bounds check for index expressions on Encode's src parameter within the function's loop. Here are some benchmark results (no change to allocations): goos: darwin goarch: arm64 pkg: encoding/hex cpu: Apple M4 │ old │ new │ │ sec/op │ sec/op vs base │ Decode/256-10 166.2n ± 0% 142.9n ± 0% -14.02% (n=180) Decode/1024-10 626.9n ± 0% 532.7n ± 0% -15.03% (n=180) Decode/4096-10 2.472µ ± 0% 2.079µ ± 0% -15.90% (n=180) Decode/16384-10 9.843µ ± 0% 8.266µ ± 0% -16.02% (n=180) geomean 1.262µ 1.069µ -15.25% │ old │ new │ │ B/s │ B/s vs base │ Decode/256-10 1.434Gi ± 0% 1.669Gi ± 0% +16.32% (p=0.000 n=180) Decode/1024-10 1.521Gi ± 0% 1.790Gi ± 0% +17.69% (p=0.000 n=180) Decode/4096-10 1.543Gi ± 0% 1.834Gi ± 0% +18.87% (p=0.000 n=180) Decode/16384-10 1.550Gi ± 0% 1.846Gi ± 0% +19.08% (p=0.000 n=180) geomean 1.512Gi 1.783Gi +17.98% Change-Id: Ibf0471a75087feed528e6b547c7c2c88c6e14d38 GitHub-Last-Rev: dcda1b6a81011649d08db5093f38b12d1ac52f7d GitHub-Pull-Request: golang/go#78436 Reviewed-on: https://go-review.googlesource.com/c/go/+/760781 Auto-Submit: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Keith Randall <khr@golang.org>
2024-05-08encoding/hex: don't overallocate memory in DecodeStringMateusz Poliwczak
Now as []byte(string) doesn't always cause heap allocation (CL 520599, #2205) we can make DecodeString simpler and more performant, by not allocating x2 the required memory. goos: linux goarch: amd64 pkg: encoding/hex cpu: AMD Ryzen 5 4600G with Radeon Graphics │ beforehex │ afterhex │ │ sec/op │ sec/op vs base │ DecodeString/256-12 197.9n ± 1% 172.2n ± 1% -13.01% (p=0.000 n=10) DecodeString/1024-12 684.9n ± 1% 598.5n ± 1% -12.61% (p=0.000 n=10) DecodeString/4096-12 2.764µ ± 0% 2.343µ ± 1% -15.23% (p=0.000 n=10) DecodeString/16384-12 10.774µ ± 1% 9.348µ ± 1% -13.23% (p=0.000 n=10) geomean 1.417µ 1.226µ -13.53% │ beforehex │ afterhex │ │ B/s │ B/s vs base │ DecodeString/256-12 1.205Gi ± 1% 1.385Gi ± 1% +14.94% (p=0.000 n=10) DecodeString/1024-12 1.393Gi ± 1% 1.593Gi ± 1% +14.42% (p=0.000 n=10) DecodeString/4096-12 1.380Gi ± 0% 1.628Gi ± 1% +17.97% (p=0.000 n=10) DecodeString/16384-12 1.416Gi ± 1% 1.632Gi ± 1% +15.25% (p=0.000 n=10) geomean 1.346Gi 1.556Gi +15.64% │ beforehex │ afterhex │ │ B/op │ B/op vs base │ DecodeString/256-12 256.0 ± 0% 128.0 ± 0% -50.00% (p=0.000 n=10) DecodeString/1024-12 1024.0 ± 0% 512.0 ± 0% -50.00% (p=0.000 n=10) DecodeString/4096-12 4.000Ki ± 0% 2.000Ki ± 0% -50.00% (p=0.000 n=10) DecodeString/16384-12 16.000Ki ± 0% 8.000Ki ± 0% -50.00% (p=0.000 n=10) geomean 2.000Ki 1.000Ki -50.00% │ beforehex │ afterhex │ │ allocs/op │ allocs/op vs base │ DecodeString/256-12 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ DecodeString/1024-12 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ DecodeString/4096-12 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ DecodeString/16384-12 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ geomean 1.000 1.000 +0.00% Change-Id: I5676e48f222d90786ea18e808cb4ecde9de82597 GitHub-Last-Rev: aeedf3f6c4a2505ae9cc0ae58a94c6b2f30806fd GitHub-Pull-Request: golang/go#67259 Reviewed-on: https://go-review.googlesource.com/c/go/+/584118 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-09-08encoding: modernize Go documentationJoe Tsai
Across all encoding packages, linkify declarations if possible. In some cases, we convert a code block into a bulleted list, which then further allows for more linkification. Change-Id: I68fedf362615b34228bab5d4859b7d87d831c570 Reviewed-on: https://go-review.googlesource.com/c/go/+/524977 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: qiulaidongfeng <2645477756@qq.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2023-08-17encoding: add AppendEncode and AppendDecodeJoe Tsai
Implement append-like equivalent of Encode and Decode functions. Fixes #53693 Change-Id: I79d8d834e3c8f77fad32be2fd391e33d4d1527ea Reviewed-on: https://go-review.googlesource.com/c/go/+/504884 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Joseph Tsai <joetsai@digital-static.net> Auto-Submit: Joseph Tsai <joetsai@digital-static.net>
2023-02-21Revert "hex: fix panic in Decode when len(src) > 2*len(dst)"Joe Tsai
This reverts CL 461958 and CL 465855. Reason for revert: This introduced an irreconcilable inconsistency with Encode Fixes #58391. Change-Id: Ifd01a04d433b24c092b73e627b8149a5851c2bca Reviewed-on: https://go-review.googlesource.com/c/go/+/469615 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Joseph Tsai <joetsai@digital-static.net> Auto-Submit: Joseph Tsai <joetsai@digital-static.net> Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-02-07encoding/hex: fix Decode output check regressionJoe Tsai
CL 461958 fixed a potential panic, but also introduced an observable regression where invalid input could be detected before the panic occurs. Adjust the check to preserve prior behavior, while also preventing the panic. Change-Id: I52819f88a6a64883fbc9fd512697c38c29ca0ccd Reviewed-on: https://go-review.googlesource.com/c/go/+/465855 Auto-Submit: Joseph Tsai <joetsai@digital-static.net> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Joseph Tsai <joetsai@digital-static.net> Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-01-27hex: fix panic in Decode when len(src) > 2*len(dst)Benjamin Prosnitz
hex.Decode never checks the length of dst and triggers a panic if there are insufficient bytes in the slice. There isn't document on what the behavior *should* be in this case. Two possibilities: 1. Error dst has insufficient space (as done in this change) 2. Reduce the length of the decode to min(dst, src) Option 1 was chosen because it seems the least surprising or subtle. Change-Id: I3bf029e3d928202de716830434285e3c165f26dd Reviewed-on: https://go-review.googlesource.com/c/go/+/461958 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Benjamin Prosnitz <bprosnitz@gmail.com> Run-TryBot: Ian Lance Taylor <iant@golang.org>
2022-09-06encoding: use strings.Buildercuiweixie
Change-Id: Ib07699df8ea41fd8d1bca8ad050859fac24623de Reviewed-on: https://go-review.googlesource.com/c/go/+/428258 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-03-11encoding/hex: implement Decode with a lookup tableeh-steve
Implement hex decode using a 256 byte lookup table instead of branching logic. In happy flow, uses 3x 64 byte (or 5x 32 byte) cache lines. name old time/op new time/op delta Decode/256-64 223ns ± 3% 135ns ± 2% -39.64% (p=0.000 n=8+8) Decode/1024-64 872ns ± 2% 512ns ± 2% -41.25% (p=0.000 n=8+8) Decode/4096-64 3.43µs ± 1% 2.01µs ± 2% -41.31% (p=0.001 n=7+7) Decode/16384-64 13.9µs ± 1% 8.0µs ± 1% -42.69% (p=0.000 n=8+7) name old speed new speed delta Decode/256-64 1.15GB/s ± 3% 1.90GB/s ± 2% +65.66% (p=0.000 n=8+8) Decode/1024-64 1.17GB/s ± 2% 2.00GB/s ± 2% +70.22% (p=0.000 n=8+8) Decode/4096-64 1.20GB/s ± 1% 2.04GB/s ± 2% +70.39% (p=0.001 n=7+7) Decode/16384-64 1.18GB/s ± 1% 2.06GB/s ± 1% +74.49% (p=0.000 n=8+7) Also reduces amd64 object size by 766 bytes, despite the extra RODATA due to removal of `fromHexChar()` and duplicated inlined versions of it and simplification of `Decode()`. Change-Id: I0988c7a30562ec154eff11db6e27954e0ce2b611 GitHub-Last-Rev: 64818018afc83ab07ec128a46aaea6a16f11400e GitHub-Pull-Request: golang/go#51432 Reviewed-on: https://go-review.googlesource.com/c/go/+/390037 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Trust: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gopher Robot <gobot@golang.org>
2020-10-20all: update references to symbols moved from io/ioutil to ioRuss Cox
The old ioutil references are still valid, but update our code to reflect best practices and get used to the new locations. Code compiled with the bootstrap toolchain (cmd/asm, cmd/dist, cmd/compile, debug/elf) must remain Go 1.4-compatible and is excluded. Also excluded vendored code. For #41190. Change-Id: I6d86f2bf7bc37a9d904b6cee3fe0c7af6d94d5b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/263142 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-03-03encoding/hex: remove unused variable from BenchmarkDumpTim Cooper
Change-Id: I1fd47e5eab27346cec488098d4f6102a0749bd28 Reviewed-on: https://go-review.googlesource.com/c/go/+/221788 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-05encoding/hex: simplify encoder arithmeticDaniel Martí
Two additions are faster than two multiplications and one addition. The code seems simpler to me too, as it's more obvious that we advance two destination bytes for each source byte. name old time/op new time/op delta Encode/256-8 374ns ± 0% 331ns ± 0% -11.44% (p=0.008 n=5+5) Encode/1024-8 1.47µs ± 0% 1.29µs ± 0% -11.89% (p=0.004 n=6+5) Encode/4096-8 5.85µs ± 1% 5.15µs ± 0% -11.89% (p=0.004 n=6+5) Encode/16384-8 23.3µs ± 0% 20.6µs ± 0% -11.68% (p=0.004 n=6+5) Change-Id: Iabc63616c1d9fded55fa668ff41dd49efeaa2ea4 Reviewed-on: https://go-review.googlesource.com/c/go/+/151198 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: roger peppe <rogpeppe@gmail.com>
2019-03-02encoding/hex: simplify decoder arithmeticDaniel Martí
Remove all multiplications and divisions from the main decoding loop. name old time/op new time/op delta Decode/256-8 323ns ± 0% 293ns ± 0% -9.29% (p=0.000 n=5+4) Decode/1024-8 1.26µs ± 0% 1.14µs ± 0% -9.48% (p=0.000 n=6+5) Decode/4096-8 4.99µs ± 0% 4.51µs ± 0% -9.55% (p=0.002 n=6+6) Decode/16384-8 20.0µs ± 0% 18.1µs ± 0% -9.54% (p=0.002 n=6+6) name old speed new speed delta Decode/256-8 791MB/s ± 0% 872MB/s ± 0% +10.34% (p=0.002 n=6+6) Decode/1024-8 814MB/s ± 0% 899MB/s ± 0% +10.48% (p=0.004 n=6+5) Decode/4096-8 821MB/s ± 0% 908MB/s ± 0% +10.55% (p=0.002 n=6+6) Decode/16384-8 821MB/s ± 0% 908MB/s ± 0% +10.54% (p=0.002 n=6+6) Change-Id: Ie9f91242ce04c130a77c1184379e3b9de38fe713 Reviewed-on: https://go-review.googlesource.com/c/151199 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-21encoding/hex: pre-allocate Dump bufferTim Cooper
name old time/op new time/op delta Dump/256-4 7.76µs ± 2% 5.82µs ± 2% -24.91% (p=0.008 n=5+5) Dump/1024-4 28.4µs ± 2% 22.6µs ± 3% -20.58% (p=0.008 n=5+5) Dump/4096-4 112µs ± 2% 88µs ± 0% -20.80% (p=0.016 n=5+4) Dump/16384-4 444µs ± 3% 361µs ± 7% -18.73% (p=0.008 n=5+5) name old alloc/op new alloc/op delta Dump/256-4 4.00kB ± 0% 1.39kB ± 0% -65.20% (p=0.008 n=5+5) Dump/1024-4 16.2kB ± 0% 5.5kB ± 0% -66.04% (p=0.008 n=5+5) Dump/4096-4 63.9kB ± 0% 20.6kB ± 0% -67.78% (p=0.008 n=5+5) Dump/16384-4 265kB ± 0% 82kB ± 0% -69.00% (p=0.008 n=5+5) name old allocs/op new allocs/op delta Dump/256-4 7.00 ± 0% 3.00 ± 0% -57.14% (p=0.008 n=5+5) Dump/1024-4 9.00 ± 0% 3.00 ± 0% -66.67% (p=0.008 n=5+5) Dump/4096-4 11.0 ± 0% 3.0 ± 0% -72.73% (p=0.008 n=5+5) Dump/16384-4 13.0 ± 0% 3.0 ± 0% -76.92% (p=0.008 n=5+5) Change-Id: I0a0d6de315b979142b05e333880da8a5e52b12ef Reviewed-on: https://go-review.googlesource.com/116495 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-05-31encoding/hex: improve Decode and DecodeString docsJosh Bleecher Snyder
Simplify the wording of both. Make the DecodeString docs more accurate: DecodeString returns a slice, not a string. Change-Id: Iba7003f55fb0a37aafcbeee59a30492c0f68aa4e Reviewed-on: https://go-review.googlesource.com/115615 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-04-17encoding/hex: fix Dumper not always closing on Close callTim Cooper
Updates #23574 Change-Id: I1b87390679e0817a2f6e4e5938994ea32df87bd7 Reviewed-on: https://go-review.googlesource.com/107596 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-02-14encoding/hex: fix potential incorrect Dumper output when Close is called ↵Tim Cooper
multiple times Fixes #23574 Change-Id: I69573de47daa6fd53cc99a78c0c4b867460242e3 Reviewed-on: https://go-review.googlesource.com/90275 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-16encoding/hex: make Decode, Decoder, DecodeString agree about partial results ↵Russ Cox
and errors CL 70210 added Decoder for #21590, and in doing so it changed the existing func Decode to return partial results for decoding errors. That seems like a good change to make to Decode, but it was untested (except as used by Decoder), inconsistent with DecodeString in all error cases, and inconsistent with Decoder in not returning partial results for odd-length input strings. This CL makes Decode, DecodeString, and Decoder all agree about the handling of partial results (they are returned) and error precedence (the error earliest in the input is reported), and it documents and tests this. Change-Id: Ifb7d1e100ecb66fe2ed5ba34a621084d480f16db Reviewed-on: https://go-review.googlesource.com/78120 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-10-20encoding/hex: add NewEncoder, NewDecoderTim Cooper
NewEncoder returns an io.Writer that writes all incoming bytes as hexadecimal characters to the underlying io.Writer. NewDecoder returns an io.Reader that does the inverse. Fixes #21590 Change-Id: Iebe0813faf365b42598f19a9aa41768f571dc0a8 Reviewed-on: https://go-review.googlesource.com/70210 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-15encoding/hex: save allocation in DecodeString()Agniva De Sarker
The destination slice does not need to be created at all. The source slice itself can be used as the destination because the decode loop increments by one and then the 'seen' byte is not used anymore. Therefore the decoded byte can be stored in that index of the source slice itself. This trick cannot be applied to EncodeString() because in that case, the destination slice is large than the source. And for a single byte in the source slice, two bytes in the destination slice is written. func BenchmarkDecodeString(b *testing.B) { for i := 0; i < b.N; i++ { DecodeString("0123456789abcdef") } } name old time/op new time/op delta DecodeString 71.0ns ± 6% 58.0ns ± 0% -18.28% (p=0.008 n=5+5) name old alloc/op new alloc/op delta DecodeString 16.0B ± 0% 8.0B ± 0% -50.00% (p=0.008 n=5+5) name old allocs/op new allocs/op delta DecodeString 1.00 ± 0% 1.00 ± 0% ~ (all equal) Change-Id: Id98db4e712444557a804155457a4dd8d1b8b416d Reviewed-on: https://go-review.googlesource.com/55611 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-08-14encoding/hex: improve testsAgniva De Sarker
The tests for error scenarios were done by manually checking error strings. Improved them by checking the actual error type instead of just the string. Printing the actual error in case of failure instead of a generic string. Also added a new scenario with both an invalid byte and an invalid length string to verify that the length is checked first before doing any computation. Change-Id: Ic2a19a6d6058912632d597590186ee2d8348cb45 Reviewed-on: https://go-review.googlesource.com/55256 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-04-18encoding/hex: change lookup table back to stringJosh Bleecher Snyder
CL 27254 changed hextable to a byte array for performance. CL 28219 fixed the compiler so that that is no longer necessary. As Kirill notes in #15808, a string is preferable as the linker can easily de-dup it. So go back. No performance changes. Change-Id: Ibef7d21d0f2507968a0606602c5dd57ed4a85b1b Reviewed-on: https://go-review.googlesource.com/40970 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-13encoding/hex: Document DecodedLen.Thordur Bjornsson
Mention that it specifically returns x / 2, and do the same for EncodedLen. Change-Id: Ie334f5abecbc487caf4965abbcd14442591bef2a Change-Id: Idfa413faad487e534489428451bf736b009293d6 Reviewed-on: https://go-review.googlesource.com/33191 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-10encoding/hex: fix example function nameJosh Bleecher Snyder
Found by vet. Change-Id: I556d87f853a734002f779b04ba5a3588a3117106 Reviewed-on: https://go-review.googlesource.com/28958 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-08encoding/hex: implement examples using all exported functionsEmmanuel Odeke
Fixes #11254. Updates #16360. Implements examples using all exported functions. This CL also updates Decode documentation to state that only hexadecimal characters are accepted in the source slice src, but also that the length of src must be even. Change-Id: Id016a4ba814f940cd300f26581fb4b9d2aded306 Reviewed-on: https://go-review.googlesource.com/28482 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-08-17encoding/hex: change lookup table from string to arrayAlberto Donizetti
name old time/op new time/op delta Encode/256-4 431ns ± 2% 391ns ± 2% -9.36% (p=0.000 n=8+8) Encode/1024-4 1.68µs ± 0% 1.51µs ± 0% -9.91% (p=0.001 n=7+7) Encode/4096-4 6.68µs ± 0% 6.03µs ± 1% -9.69% (p=0.000 n=8+8) Encode/16384-4 27.0µs ± 1% 24.0µs ± 0% -11.03% (p=0.000 n=8+7) Change-Id: I6994e02f77797349c4e188377d84f97dffe98399 Reviewed-on: https://go-review.googlesource.com/27254 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-02all: single space after period.Brad Fitzpatrick
The tree's pretty inconsistent about single space vs double space after a period in documentation. Make it consistently a single space, per earlier decisions. This means contributors won't be confused by misleading precedence. This CL doesn't use go/doc to parse. It only addresses // comments. It was generated with: $ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])') $ go test go/doc -update Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7 Reviewed-on: https://go-review.googlesource.com/20022 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Dave Day <djd@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-21encoding/hex: minor cleanupJosh Bleecher Snyder
Change-Id: I404fd946dd0607fa41e2abe0d1d8081d4433ff0a Reviewed-on: https://go-review.googlesource.com/19762 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2014-09-08build: move package sources from src/pkg to srcRuss Cox
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.