Add String method to generated enums.

This commit is contained in:
zer0sub 2019-05-21 17:40:25 +02:00
parent 3917c84694
commit 2a9a616e7c
2 changed files with 6 additions and 2 deletions

View file

@ -96,4 +96,8 @@ func (e *{{camelize $.Name}}) Scan(value interface{}) error {
}
}
func (e {{camelize $.Name}}) String() string {
return string(e)
}
`