]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/internal/archive: make error message contain printable characters only
authorCherry Zhang <cherryyz@google.com>
Fri, 30 Apr 2021 17:57:12 +0000 (13:57 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 30 Apr 2021 18:43:09 +0000 (18:43 +0000)
commit83ac59b1a55a4ae728393b445e2d2438f930b767
tree675a41165095f71ab03387b2964317e3694bc534
parentc3b2b0415666a1b2a3e00583a2f192ad2001f93e
cmd/internal/archive: make error message contain printable characters only

Use %q instead of %s to print unchecked bytes. Also strip the
"\x00" byte, as "go116ld" reads better than "\x00go116ld".

Change-Id: Id3d1f426ea91d53a55b928dac4a68e1333b80158
Reviewed-on: https://go-review.googlesource.com/c/go/+/315750
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/internal/archive/archive.go