coder / serpent

CLI framework for scale and configurability inspired by Cobra
Creative Commons Zero v1.0 Universal
6 stars 1 forks source link

fix: implement yaml methods for enums #8

Closed f0ssel closed 3 months ago

f0ssel commented 3 months ago

My tests are failing over at https://github.com/coder/coder/pull/12566, enums are failing to marshal correctly, and this patch is what made it work on my branch when it was clibase.

Emyrk commented 3 months ago

Just a comment, we could make the enum type just extend the Validate.

https://github.com/coder/serpent/blob/main/values.go#L30-L82

Doesn't really matter, but could not have to implement the marshal types again.