From ff1a5d73a1ce1abe9ec574b47b7209fa676cd1d1 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 10 Jul 2014 21:10:40 -0400 Subject: [PATCH] Fixed compilation errors in zwinconstgen.go. --- redo/zwinconstgen.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/redo/zwinconstgen.go b/redo/zwinconstgen.go index 1df9bd9..f4f0e9f 100644 --- a/redo/zwinconstgen.go +++ b/redo/zwinconstgen.go @@ -173,11 +173,11 @@ func main() { writeLine(f, "import \"go/format\"") writeLine(f, "/*") writeLine(f, cgopreamble) - for _, const := range consts { - writeConstCast(f, const) + for _, c := range consts { + writeConstCast(f, c) } writeLine(f, "*/") - writeLine(f, "import \"C\") + writeLine(f, "import \"C\"") writeLine(f, "func main() {") writeLine(f, "\tbuf := new(bytes.Buffer)") writeLine(f, "\tfmt.Fprintln(buf, \"package main\")") @@ -193,7 +193,7 @@ func main() { writeLine(f, "\tfmt.Fprintln(buf, \"}\")") writeLine(f, "\tres, err := format.Source(buf.Bytes())") writeLine(f, "\tif err != nil { panic(err) }") - wrtieLine(f, "\tfmt.Printf(\"%s\", res)") + writeLine(f, "\tfmt.Printf(\"%s\", res)") writeLine(f, "}") cmd := exec.Command("go", "run")