mirror of https://github.com/dmarkham/enumer.git
Updated readme
This commit is contained in:
parent
d3da35e3d0
commit
04c93cadb4
|
@ -13,6 +13,8 @@ from a REST API request... In short, from those places where using the real enum
|
|||
be almost meaningless or hard to trace or use by a human.
|
||||
* When the flag `json` is provided, two more methods will be generated, `MarshalJSON()` and `UnmarshalJSON()`. Those make
|
||||
the enum conform the `json.Marshaler` and `json.Unmarshaler` interfaces. Very useful to use it in JSON APIs.
|
||||
* When the flag `sql` is provided the methods for implementing the Scanner and Valuer interfaces will be also generated.
|
||||
Useful when storing the enum in a database.
|
||||
|
||||
For example, if we have an enum type called `Pill`,
|
||||
```go
|
||||
|
|
Loading…
Reference in New Issue