all: fix vet nits

Fixes these complaints from vet:

cmd/compile/internal/gc/noder.go:32: cmd/compile/internal/syntax.Error composite literal uses unkeyed fields
cmd/compile/internal/gc/noder.go:1035: cmd/compile/internal/syntax.Error composite literal uses unkeyed fields
cmd/compile/internal/gc/noder.go:1051: cmd/compile/internal/syntax.Error composite literal uses unkeyed fields
cmd/compile/internal/syntax/parser_test.go:182: possible formatting directive in Error call
net/http/client_test.go:1334: possible formatting directive in Fatal call

Change-Id: I5f90ec30f3c106c7e66c92e2b6f8d3b4874fec66
Reviewed-on: https://go-review.googlesource.com/33133
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2016-11-11 07:37:32 -08:00
parent 50fed64dd9
commit eb8f2a8320
3 changed files with 5 additions and 5 deletions

View file

@ -29,7 +29,7 @@ func parseFile(filename string) {
if !imported_unsafe {
for _, x := range p.linknames {
p.error(syntax.Error{0, x, "//go:linkname only allowed in Go files that import \"unsafe\""})
p.error(syntax.Error{Line: x, Msg: "//go:linkname only allowed in Go files that import \"unsafe\""})
}
}
@ -1032,7 +1032,7 @@ func (p *noder) pragma(pos, line int, text string) syntax.Pragma {
break
}
if n > 1e8 {
p.error(syntax.Error{pos, line, "line number out of range"})
p.error(syntax.Error{Pos: pos, Line: line, Msg: "line number out of range"})
errorexit()
}
if n <= 0 {
@ -1048,7 +1048,7 @@ func (p *noder) pragma(pos, line int, text string) syntax.Pragma {
f := strings.Fields(text)
if len(f) != 3 {
p.error(syntax.Error{pos, line, "usage: //go:linkname localname linkname"})
p.error(syntax.Error{Pos: pos, Line: line, Msg: "usage: //go:linkname localname linkname"})
break
}
lookup(f[1]).Linkname = f[2]