aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xgbgen
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-03-29 16:23:18 -0400
committerPřemysl Janouch <p@janouch.name>2018-09-08 16:49:25 +0200
commit1614b58c420f7875f92a5469c77fd7aeccc7a106 (patch)
treebccb47fefebc03e48c39ab96be807faa0fd15442 /nexgb/xgbgen
parent8d343cfd3a12d910d6a663f2d5f2cd4a41d88ce2 (diff)
downloadhaven-1614b58c420f7875f92a5469c77fd7aeccc7a106.tar.gz
haven-1614b58c420f7875f92a5469c77fd7aeccc7a106.tar.xz
haven-1614b58c420f7875f92a5469c77fd7aeccc7a106.zip
fix structs with field name of 'Bytes'
(it conflict with a method of the same name that is generated for all such structs)
Diffstat (limited to 'nexgb/xgbgen')
-rw-r--r--nexgb/xgbgen/field.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/nexgb/xgbgen/field.go b/nexgb/xgbgen/field.go
index bf3b3be..2522a06 100644
--- a/nexgb/xgbgen/field.go
+++ b/nexgb/xgbgen/field.go
@@ -87,6 +87,9 @@ func (f *SingleField) Initialize(p *Protocol) {
}
func (f *SingleField) SrcName() string {
+ if f.srcName == "Bytes" {
+ return "Bytes_"
+ }
return f.srcName
}