Permalink
Browse files

filter vendor packages in go-external-deps

  • Loading branch information...
peter-edge committed Jan 14, 2016
1 parent e2fd337 commit a94ffa42cdadf99cacea4e54a9a2486c25aef5ae
Showing with 7 additions and 1 deletion.
  1. +7 −1 go-external-deps/main.go
@@ -39,8 +39,14 @@ func do() error {
if err != nil {
return err
}
var noVendorLines []string
for _, line := range lines {
if !strings.Contains("line", fmt.Sprintf("%s/vendor/", pkg)) {
noVendorLines = append(noVendorLines, line)
}
}
args := []string{"go", "list", "-f", "{{if not .Standard}}{{.ImportPath}}{{end}}"}
args = append(args, lines...)
args = append(args, noVendorLines...)
buffer = bytes.NewBuffer(nil)
if err = pkgexec.RunStdout(buffer, args...); err != nil {
return err

0 comments on commit a94ffa4

Please sign in to comment.