File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ The Go [language spec] does not have an explicit definition for enums. For
10
10
the purpose of this analyzer, and by convention, an enum type is any named
11
11
type that:
12
12
13
- - has underlying type float, string, or integer (includes byte and rune);
14
- and
13
+ - has an [ underlying type] of float, string, or integer (includes byte
14
+ and rune); and
15
15
- has at least one constant of its type defined in the same [block].
16
16
17
17
In the example below, Biome is an enum type. The three constants are its
@@ -209,6 +209,7 @@ To ignore specific types, specify the -ignore-enum-types flag:
209
209
exhaustive -ignore-enum-types '^time\.Duration$|^example\.org/measure\.Unit$'
210
210
211
211
[language spec]: https://golang.org/ref/spec
212
+ [underlying type]: https://golang.org/ref/spec#Underlying_types
212
213
[block]: https://golang.org/ref/spec#Blocks
213
214
[BasicKind]: https://pkg.go.dev/go/types#BasicKind
214
215
*/
You can’t perform that action at this time.
0 commit comments