Merge pull request #8 from neurodrone/master

Correct jsonenums go-generate example run
This commit is contained in:
Francesc Campoy 2015-07-15 10:29:57 -07:00
commit 36bac1a5f6

View File

@ -5,7 +5,7 @@
// JSONenums is a tool to automate the creation of methods that satisfy the // JSONenums is a tool to automate the creation of methods that satisfy the
// fmt.Stringer, json.Marshaler and json.Unmarshaler interfaces. // fmt.Stringer, json.Marshaler and json.Unmarshaler interfaces.
// Given the name of a (signed or unsigned) integer type T that has constants // Given the name of a (signed or unsigned) integer type T that has constants
// defined, stringer will create a new self-contained Go source file implementing // defined, jsonenums will create a new self-contained Go source file implementing
// //
// func (t T) String() string // func (t T) String() string
// func (t T) MarshalJSON() ([]byte, error) // func (t T) MarshalJSON() ([]byte, error)
@ -48,7 +48,7 @@
// //
// Typically this process would be run using go generate, like this: // Typically this process would be run using go generate, like this:
// //
// //go:generate stringer -type=Pill // //go:generate jsonenums -type=Pill
// //
// If multiple constants have the same value, the lexically first matching name will // If multiple constants have the same value, the lexically first matching name will
// be used (in the example, Acetaminophen will print as "Paracetamol"). // be used (in the example, Acetaminophen will print as "Paracetamol").