Bug fix in gen.go: do not try to write if there is no output.
This commit is contained in:
parent
56ab75dcc2
commit
0d662564aa
|
@ -131,6 +131,9 @@ func newImportSpec(name string) *ast.ImportSpec {
|
|||
}
|
||||
|
||||
func gen(wantImps []string) {
|
||||
if nodes == nil {
|
||||
return
|
||||
}
|
||||
of, err := os.Create("pgen.go")
|
||||
if err != nil {
|
||||
log.Fatal("Cannot open pgen.go")
|
||||
|
|
Loading…
Reference in New Issue
Block a user