Skip to content

Commit

Permalink
skip cgo package
Browse files Browse the repository at this point in the history
  • Loading branch information
maitredede committed Apr 8, 2020
1 parent 3b82b47 commit b9554c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions parser.go
Expand Up @@ -1449,6 +1449,10 @@ func (parser *Parser) getAllGoFileInfoFromDeps(pkg *depth.Pkg) error {
return nil
}

// Skip cgo
if pkg.Raw == nil && pkg.Name == "C" {
return nil
}
srcDir := pkg.Raw.Dir
files, err := ioutil.ReadDir(srcDir) // only parsing files in the dir(don't contains sub dir files)
if err != nil {
Expand Down

0 comments on commit b9554c4

Please sign in to comment.