diff options
author | Andrew Gallant <jamslam@gmail.com> | 2016-03-29 16:23:18 -0400 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2018-09-08 16:49:25 +0200 |
commit | 1614b58c420f7875f92a5469c77fd7aeccc7a106 (patch) | |
tree | bccb47fefebc03e48c39ab96be807faa0fd15442 /nexgb/xgbgen/field.go | |
parent | 8d343cfd3a12d910d6a663f2d5f2cd4a41d88ce2 (diff) | |
download | haven-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/field.go')
-rw-r--r-- | nexgb/xgbgen/field.go | 3 |
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 } |