Skip to content

Commit 17b2ecf

Browse files
committed
Add type to const definitions for enum values
Fixes #552
1 parent 9f66cb2 commit 17b2ecf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

examples/enums/enums.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type ServerState int
1717
// generates successive constant values automatically; in this
1818
// case 0, 1, 2 and so on.
1919
const (
20-
StateIdle = iota
20+
StateIdle ServerState = iota
2121
StateConnected
2222
StateError
2323
StateRetrying

examples/enums/enums.hash

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
097dc14a53f63735563f6f75314c30908aa46748
2-
3zjUiM66KZe
1+
ee42927ee1c864794570e23e8dadb2d20d64a4fd
2+
prQMptP_p1s

public/enums

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)