Deal with special case where import is C.
Addresses #82.
diff --git a/cmd/guess_deps.go b/cmd/guess_deps.go
index f637c7c..53c8ab7 100644
--- a/cmd/guess_deps.go
+++ b/cmd/guess_deps.go
@@ -59,7 +59,7 @@
return err
}
- if pkg.Goroot {
+ if pkg.Goroot || name == "C" {
return nil
}
diff --git a/cmd/tree.go b/cmd/tree.go
index 377aba1..6ec2043 100644
--- a/cmd/tree.go
+++ b/cmd/tree.go
@@ -121,6 +121,7 @@
ptypeVendor
ptypeGopath
ptypeGoroot
+ ptypeCgo
)
type pinfo struct {
@@ -165,6 +166,12 @@
return info
}
}
+
+ // Finally, if this is "C", we're dealing with cgo
+ if name == "C" {
+ info.PType = ptypeCgo
+ }
+
return info
}