ValidEnum represents an enum that can be parsed and validated.
| 332 | |
| 333 | // ValidEnum represents an enum that can be parsed and validated. |
| 334 | type ValidEnum interface { |
| 335 | // Add more types as needed (avoid importing large dependency trees). |
| 336 | ~string |
| 337 | |
| 338 | // Valid is required on the enum type to be used with ParseEnum. |
| 339 | Valid() bool |
| 340 | } |
| 341 | |
| 342 | // ParseEnum is a function that can be passed into ParseCustom that handles enum |
| 343 | // validation. |
no outgoing calls
no test coverage detected