To use, mark up a type for which you have consts, using Rob’s example:
// +gen stringer type Pill int const ( Placebo Pill = iota Aspirin Ibuprofen Paracetamol Acetaminophen = Paracetamol )
gen your package, as normal. You should see a new file,
pill_stringer.go, containing the String method for your type.