Commit Graph

16 Commits

Author SHA1 Message Date
Álvaro 1dea5e9823 Create "values" and "belongsToEnum" methods 2018-03-09 11:32:26 +00:00
Álvaro 7aaf68cd58 Add missing comments 2018-03-08 20:17:07 +00:00
Álvaro López Espinosa 60ace443ec
Merge pull request #28 from MrGossett/MrGossett/comment-json-yaml
Comments for JSON and YAML marshaler methods
2018-03-08 20:12:28 +00:00
Álvaro 81eff08fc7 Add a new "text" flag for TextMarshaler methods 2018-03-08 19:51:11 +00:00
Tim Gossett f283678ee0
Comments for JSON and YAML marshaler methods
`go vet` will complain when an exported method is not properly
documented. This change adds comments to the generated `MarshalJSON`,
`UnmarshalJSON`, `MarshalYAML`, and `UnmarshalYAML` methods to satisfy
`go vet`.

As of go 1.10, the go test command now automatically runs go vet on the
package being tested. Complaints from `go vet` are treated like build
errors and prevent execution of the test. This means that generated code
that is not properly documented will prevent test execution.

[1]: https://golang.org/doc/go1.10#test-vet
2018-02-19 22:20:31 -05:00
Steve Atkins bd9938fa86 Remove autotrimprefix option; add basic tests for -trimprefix. 2018-02-05 16:48:43 -08:00
Steve Atkins e1f9d08449 Add expected comments. 2018-02-05 16:09:28 -08:00
Steve Atkins 276f4081b1 Merge branch 'master' of git://github.com/alvaroloes/enumer 2018-02-05 15:45:41 -08:00
Michael Wolber aa50e29ee8
Added comment to generated ...String function. Removed usage of _ in identifiers. 2018-01-03 15:35:09 +01:00
Steve Atkins 51d23ad531 add -trimprefix and -autotrimprefix 2017-04-10 11:37:23 -07:00
achernov 432dffaa95 Add enum value string representation transformation feature 2017-02-01 10:01:12 +03:00
Jim Minter 86cfc17470 add yaml support 2016-12-20 12:57:15 +00:00
Álvaro d3da35e3d0 Fixes and adds tests after merge 2016-10-26 16:59:55 +01:00
Alvaro Lopez Espinosa 986f3e9353 Changed the flag noJSON to json 2016-05-21 13:34:12 +01:00
Álvaro 8ff8ff6be4 Updated tests 2016-01-19 19:54:00 +00:00
alvaroloes 58c57e5d15 Added a method to the generated code to get the enum value from the string name. Fixed all tests. 2015-12-29 13:14:54 +00:00