aboutsummaryrefslogtreecommitdiff
path: root/pkg/pdef/pdefgen/pdefgen.go
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-12 21:58:18 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-12 21:58:18 -0400
commit8bad12c97d8c4eb543ed21fbda9c894b407db892 (patch)
treed20081a3937d3dd8db565032f6c2db5b806d4476 /pkg/pdef/pdefgen/pdefgen.go
parent2c6c9e1a747d6317cddac0dbffeeabcd44a268ba (diff)
downloadAtlas-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.go3
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])
}