Skip to content

Commit

Permalink
Add type to const definitions for enum values
Browse files Browse the repository at this point in the history
Fixes #552
  • Loading branch information
eliben committed Sep 11, 2024
1 parent 9f66cb2 commit 17b2ecf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/enums/enums.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type ServerState int
// generates successive constant values automatically; in this
// case 0, 1, 2 and so on.
const (
StateIdle = iota
StateIdle ServerState = iota
StateConnected
StateError
StateRetrying
Expand Down
4 changes: 2 additions & 2 deletions examples/enums/enums.hash
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
097dc14a53f63735563f6f75314c30908aa46748
3zjUiM66KZe
ee42927ee1c864794570e23e8dadb2d20d64a4fd
prQMptP_p1s
6 changes: 3 additions & 3 deletions public/enums

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 17b2ecf

Please sign in to comment.