Skip to content

Commit

Permalink
go: Fix regression in enum names
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickey Reiss committed Oct 2, 2018
1 parent 6b0147a commit 7cfbefb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion langs/go/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

0 comments on commit 7cfbefb

Please sign in to comment.