OCaml: Refactor configuration parser handling of su_command sanity checks
This commit is contained in:
parent
821ab1eaf1
commit
a3805ea1bd
3 changed files with 37 additions and 44 deletions
|
|
@ -74,8 +74,14 @@ let string_of_key key =
|
|||
| SuCommandQuoted -> "su_command_quoted"
|
||||
| Unknown -> "<unknown key>"
|
||||
|
||||
let string_of_default_bool (b: default_bool) =
|
||||
let string_of_default_bool (b: default_bool): string =
|
||||
match b with
|
||||
| true -> "true"
|
||||
| false -> "false"
|
||||
| Default -> "default"
|
||||
|
||||
let default_bool_of_string (s: string): default_bool =
|
||||
match s with
|
||||
| "true" -> true
|
||||
| "false" -> false
|
||||
| _ -> Default
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue