diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-12 21:58:18 -0400 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-12 21:58:18 -0400 |
commit | 8bad12c97d8c4eb543ed21fbda9c894b407db892 (patch) | |
tree | d20081a3937d3dd8db565032f6c2db5b806d4476 /pkg/pdef/pdefgen/pdefgen.go | |
parent | 2c6c9e1a747d6317cddac0dbffeeabcd44a268ba (diff) | |
download | Atlas-8bad12c97d8c4eb543ed21fbda9c894b407db892.tar.gz Atlas-8bad12c97d8c4eb543ed21fbda9c894b407db892.zip |
pkg/{pdata,pdef/pdefgen}: Remove s prefix from struct type names
Diffstat (limited to 'pkg/pdef/pdefgen/pdefgen.go')
-rw-r--r-- | pkg/pdef/pdefgen/pdefgen.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/pdef/pdefgen/pdefgen.go b/pkg/pdef/pdefgen/pdefgen.go index fce1ea6..80256fd 100644 --- a/pkg/pdef/pdefgen/pdefgen.go +++ b/pkg/pdef/pdefgen/pdefgen.go @@ -691,6 +691,9 @@ func mangleEnumValue(name, value string) string { func mangle(ident string, upper bool) string { x := []rune(ident) + if len(x) > 2 && x[0] == 's' && unicode.IsUpper(x[1]) { + x = x[1:] // remove the s/e prefix for struct/enum names + } if upper { x[0] = unicode.ToUpper(x[0]) } |