Commit Graph

8 Commits

Author SHA1 Message Date
Á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
Michael Wolber aa50e29ee8
Added comment to generated ...String function. Removed usage of _ in identifiers. 2018-01-03 15:35:09 +01:00
Jim Minter 86cfc17470 add yaml support 2016-12-20 12:57:15 +00:00
Álvaro 06fa207af0 Added a new flag/feature to generate json marshaling methods 2016-01-19 19:39:33 +00:00
alvaroloes 54304668d7 Move code out of the inner for loop as it only depend on the outer one 2015-12-31 14:03:36 +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