Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
Followup #8.

Fixes #12.

Closes: gh-11 [via git-merge-pr]
  • Loading branch information
dmitshur authored and dominikh committed Jul 10, 2016
1 parent b203636 commit ffd5bdc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions match.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ package gotool
import (
"fmt"
"go/build"
"log"
"os"
"path"
"path/filepath"
Expand Down Expand Up @@ -155,7 +156,7 @@ func (c Context) importPathsNoDotExpansion(args []string) []string {
a = path.Clean(a)
}
if isMetaPackage(a) {
out = append(out, allPackages(a)...)
out = append(out, c.allPackages(a)...)
continue
}
out = append(out, a)
Expand Down Expand Up @@ -263,7 +264,7 @@ func matchPackagesInFS(pattern string) []string {
// as not matching the pattern. Go 1.5 and earlier skipped, but that
// behavior means people miss serious mistakes.
// See golang.org/issue/11407.
if p, err := c.BuildContext.ImportDir(path, 0); err != nil && (p == nil || len(p.InvalidGoFiles) == 0) {
if p, err := build.ImportDir(path, 0); err != nil && (p == nil || len(p.InvalidGoFiles) == 0) {
if _, noGo := err.(*build.NoGoError); !noGo {
log.Print(err)
}
Expand Down

4 comments on commit ffd5bdc

@kisielk
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Sorry about that :) I kind of assumed by the encouragement to merge that @shurcooL had looked it over, guess I shouldn't assume that...

@dmitshur
Copy link
Contributor Author

@dmitshur dmitshur commented on ffd5bdc Jul 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. :)

But just for reference, when I actually review a change and see no issues, I say "LGTM". In this case, I did not review #8 other than a cursory look, because I thought it's much easier for the person with push rights to review/test it before (or at least after) merging.

That's why I said:

@kisielk, can you review and merge this PR?

I also thought @FiloSottile would've done more testing, but I later noticed the branch name patch-1 that suggests the changes were done in the GitHub web editor, not in an environment where go build is available. 😛

Anyway, we fixed all issues within < 24 hours, so I don't mind.

@kisielk
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was just being a bit sloppy :) Seems to be fine now though.

@FiloSottile
Copy link
Contributor

@FiloSottile FiloSottile commented on ffd5bdc Jul 10, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.