Merge pull request #165 from kumakichi/fixed_import_C

fixed import "C"
This commit is contained in:
Steve
2020-04-13 07:30:30 -07:00
committed by GitHub

View File

@@ -30,6 +30,9 @@ func addImports(imports map[string]string, decl ast.Decl, srcDir string) {
}
}
quotedPath := importSpec.Path.Value // e.g. "\"sample/app/models\""
if quotedPath == `"C"` {
continue
}
fullPath := quotedPath[1 : len(quotedPath)-1] // Remove the quotes
// If the package was not aliased (common case), we have to import it