fix(binapigen): Fix name conflict for union field constructors
[govpp.git] / binapigen / binapigen.go
index 2dbd661..35a07d0 100644 (file)
@@ -271,7 +271,7 @@ func newUnion(gen *Generator, file *File, apitype vppapi.UnionType) *Union {
        typ := &Union{
                UnionType: apitype,
                GoIdent: GoIdent{
-                       GoName:       camelCaseName(apitype.Name),
+                       GoName:       withSuffix(camelCaseName(apitype.Name), "Union"),
                        GoImportPath: file.GoImportPath,
                },
        }