diff --git a/langs/go/go.go b/langs/go/go.go index 6088add..ef95e6c 100644 --- a/langs/go/go.go +++ b/langs/go/go.go @@ -126,7 +126,7 @@ func (m *GoModeler) writeEnum(enum *firemodel.SchemaEnum, sourceCoder firemodel. f.Const().DefsFunc(func(g *jen.Group) { for _, val := range enum.Values { - enumValName := fmt.Sprintf("%s_%s", enumName, val.Name) + enumValName := fmt.Sprintf("%s_%s", enumName, strcase.ToScreamingSnake(val.Name)) if enum.Comment == "" { g.Commentf("TODO: Add comment to %s in firemodel schema.", enumValName) } else { diff --git a/testfixtures/firemodel/TestFiremodelFromSchema/go/test_direction.firemodel.go b/testfixtures/firemodel/TestFiremodelFromSchema/go/test_direction.firemodel.go index 7ff655c..b0b2bff 100644 --- a/testfixtures/firemodel/TestFiremodelFromSchema/go/test_direction.firemodel.go +++ b/testfixtures/firemodel/TestFiremodelFromSchema/go/test_direction.firemodel.go @@ -6,12 +6,12 @@ package firemodel type TestDirection string const ( - // TODO: Add comment to TestDirection_left in firemodel schema. - TestDirection_left TestDirection = "LEFT" - // TODO: Add comment to TestDirection_right in firemodel schema. - TestDirection_right TestDirection = "RIGHT" - // TODO: Add comment to TestDirection_up in firemodel schema. - TestDirection_up TestDirection = "UP" - // TODO: Add comment to TestDirection_down in firemodel schema. - TestDirection_down TestDirection = "DOWN" + // TODO: Add comment to TestDirection_LEFT in firemodel schema. + TestDirection_LEFT TestDirection = "LEFT" + // TODO: Add comment to TestDirection_RIGHT in firemodel schema. + TestDirection_RIGHT TestDirection = "RIGHT" + // TODO: Add comment to TestDirection_UP in firemodel schema. + TestDirection_UP TestDirection = "UP" + // TODO: Add comment to TestDirection_DOWN in firemodel schema. + TestDirection_DOWN TestDirection = "DOWN" )