Don't needlessly change source files every time.

This commit is contained in:
Andrew Gallant
2013-08-11 20:45:36 -04:00
committed by Přemysl Janouch
parent 0685fb57e1
commit b06a8ca976
29 changed files with 30 additions and 118 deletions

View File

@@ -6,7 +6,6 @@ import (
"fmt"
"log"
"sort"
"time"
)
// Context represents the protocol we're converting to Go, and a writer
@@ -56,11 +55,8 @@ func (c *Context) Morph(xmlBytes []byte) {
c.protocol.PkgName(), c.protocol.ExtXName)
c.Putln("package %s", c.protocol.PkgName())
c.Putln("")
c.Putln("/*")
c.Putln("\tThis file was generated by %s.xml on %s.",
c.protocol.Name, time.Now().Format("Jan 2 2006 3:04:05pm MST"))
c.Putln("\tThis file is automatically generated. Edit at your peril!")
c.Putln("*/")
c.Putln("// This file is automatically generated from %s.xml. "+
"Edit at your peril!", c.protocol.Name)
c.Putln("")
// Write imports. We always need to import at least xgb.