fix structs with field name of 'Bytes'

(it conflict with a method of the same name that is generated for
all such structs)
This commit is contained in:
Andrew Gallant
2016-03-29 16:23:18 -04:00
committed by Přemysl Janouch
parent 8d343cfd3a
commit 1614b58c42
4 changed files with 11 additions and 7 deletions

View File

@@ -87,6 +87,9 @@ func (f *SingleField) Initialize(p *Protocol) {
}
func (f *SingleField) SrcName() string {
if f.srcName == "Bytes" {
return "Bytes_"
}
return f.srcName
}