alvaroloes / enumer

A Go tool to auto generate methods for your enums
Other
478 stars 111 forks source link

Comments for JSON and YAML marshaler methods #28

Closed MrGossett closed 6 years ago

MrGossett commented 6 years ago

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.

alvaroloes commented 6 years ago

Thank you very much!