I am trying to build static call graph of go project using cha package. However when there is a go file which imports "C", the packages.Load(cfg, args...) function returns error as it is not able to load such packages. The config struct is: cfg := &packages.Config{ Mode: packages.LoadSyntax | 4096, Tests: false, Dir: "", BuildFlags: []string{"-tags=cgo=1"}, } Can someone help me out with the BuildFlags field so that it can successfully load packages with "C" imports. The error currently is: go list failed to return CompiledGoFiles. This may indicate failure to perform cgo processing; try building at the command line. See https://golang.org/issue/38990.
-- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/63e9e5db-6342-4a19-b206-5e4cb5fae948n%40googlegroups.com.