Add String method to generated enums.
This commit is contained in:
parent
3917c84694
commit
2a9a616e7c
2 changed files with 6 additions and 2 deletions
|
|
@ -96,4 +96,8 @@ func (e *{{camelize $.Name}}) Scan(value interface{}) error {
|
|||
}
|
||||
}
|
||||
|
||||
func (e {{camelize $.Name}}) String() string {
|
||||
return string(e)
|
||||
}
|
||||
|
||||
`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue