forked from mirror/enumer
21 lines
300 B
Go
21 lines
300 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
//go:generate go run github.com/dmarkham/enumer -type=Pill -json
|
|
type Pill int
|
|
|
|
const (
|
|
Placebo Pill = iota
|
|
Aspirin
|
|
Ibuprofen
|
|
Paracetamol
|
|
Acetaminophen = Paracetamol
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println(PillStrings())
|
|
fmt.Println(Placebo.IsAPill())
|
|
fmt.Println(Placebo)
|
|
}
|