-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kmsg: add EnumStrings(), ParseEnum() functions
This should make it easier to list valid options for the string value of an enum, as well as easier to parse a string into an enum. The parsing is aggressive in what we accept by lowercasing and stripping all dots and underscores. I expect most input to just match based off lowercasing, but a stray _ shouldn't affect anything.
- Loading branch information
Showing
3 changed files
with
409 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.