]> Cypherpunks repositories - gostls13.git/commit
cmd/go: report non-Go files as package error
authorGergely Brautigam <skarlso777@gmail.com>
Sat, 9 Mar 2019 12:28:50 +0000 (13:28 +0100)
committerBryan C. Mills <bcmills@google.com>
Tue, 16 Apr 2019 18:20:43 +0000 (18:20 +0000)
commita16dcc00526dbb5ff411004c987a4182a8d68e7c
tree668353457c6d87be8825565ccf2d6bf02be2c90a
parent56b8ee23986c48ec63a0411f12b3fcaad61d6c06
cmd/go: report non-Go files as package error

This change modifies cmd/go/list to format the error correctly in case
-e flag is set. It also fixes a bug where the package loader was only
ever checking the first pattern if it had the go extension. This caused
and error when a file without .go extension was not the first argument.

Fixes #29899

Change-Id: I029bf4465ad4ad054434b8337c1d2a59369783da
Reviewed-on: https://go-review.googlesource.com/c/go/+/166398
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/load/pkg.go
src/cmd/go/testdata/script/list_test_non_go_files.txt [new file with mode: 0644]