]> Cypherpunks repositories - gostls13.git/commit
archive/tar: simplify toASCII and parseString
authorJoe Tsai <joetsai@digital-static.net>
Thu, 10 Aug 2017 21:41:44 +0000 (14:41 -0700)
committerJoe Tsai <thebrokentoaster@gmail.com>
Sun, 13 Aug 2017 02:32:28 +0000 (02:32 +0000)
commit1d81251599fd1b8f9da888e10c1054c96d1e1fb1
tree4235ab8c5efa6c85405d8788fc8f8f1832942ec2
parent23cd87eb0a2d49a3208824feaf34d8b852da422f
archive/tar: simplify toASCII and parseString

Use a simple []byte instead of bytes.Buffer to create a string.
Use bytes.IndexByte instead of our own for loop.

Change-Id: Ic4a1161d79017fd3af086a05c53d5f20a5f09326
Reviewed-on: https://go-review.googlesource.com/54752
Reviewed-by: Avelino <t@avelino.xxx>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
src/archive/tar/strconv.go