forked from mirror/enumer
Add code coverage
This commit is contained in:
parent
f6af706459
commit
58936429ea
|
@ -1,4 +1,4 @@
|
||||||
# Enumer
|
# Enumer ![cover.run go](https://cover.run/go/github.com/alvaroloes/enumer.svg?tag=golang-1.10)
|
||||||
Enumer is a tool to generate Go code that adds useful methods to Go enums (constants with a specific type).
|
Enumer is a tool to generate Go code that adds useful methods to Go enums (constants with a specific type).
|
||||||
It started as a fork of [Rob Pike’s Stringer tool](https://godoc.org/golang.org/x/tools/cmd/stringer).
|
It started as a fork of [Rob Pike’s Stringer tool](https://godoc.org/golang.org/x/tools/cmd/stringer).
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ func (i %[1]s) IsA%[1]s() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
// Arguments to format are:
|
// Arguments to format are:
|
||||||
// [1]: type name
|
// [1]: type name
|
||||||
const stringBelongsMethodSet = `// IsA%[1]s returns "true" if the value is listed in the enum definition. "false" otherwise
|
const stringBelongsMethodSet = `// IsA%[1]s returns "true" if the value is listed in the enum definition. "false" otherwise
|
||||||
|
|
Loading…
Reference in New Issue