From 86c0ff156ce9352410c10f64171e9aedaab25bfa Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 18 Jun 2013 14:12:51 -0700 Subject: [PATCH] go.tools/cmd/vet: set the package name unconditionally A better fix than the one in CL 10400044 R=gri CC=golang-dev https://golang.org/cl/10376044 --- cmd/vet/main.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/vet/main.go b/cmd/vet/main.go index 564e2e2a0e..597f772ec9 100644 --- a/cmd/vet/main.go +++ b/cmd/vet/main.go @@ -220,11 +220,7 @@ func doPackage(directory string, names []string) { files = append(files, &File{fset: fs, content: data, name: name, file: parsedFile}) } pkg := new(Package) - if directory == "." { - // Special case: Use the base name so we don't see "." as the package name in messages. - directory = filepath.Base(filepath.Dir(names[0])) - } - pkg.path = directory + pkg.path = astFiles[0].Name.Name pkg.files = files // Type check the package. err := pkg.check(fs, astFiles)