This commit is contained in:
swrup 2025-12-14 23:34:25 +01:00
parent 638cccc185
commit 26f5e392ee
6 changed files with 195 additions and 49 deletions

View file

@ -228,7 +228,8 @@ let ed25519 s =
|> Result.map_error (fun e -> Fmt.str "%a" Mirage_crypto_ec.pp_error e)
|> unwrap_res
module Parse_alt_unit_names = struct
(* TODO alt_unit_names jsont *)
module Alt_unit_names = struct
let rm_brackets s =
let s = String.trim s in
match
@ -267,4 +268,9 @@ module Parse_alt_unit_names = struct
| Some k -> k
in
(k, v))
let to_json_string l =
let l = List.map (fun (i, s) -> Fmt.str {|"%d": "%s"|} i s) l in
let s = String.concat "," l in
"{" ^ s ^ "}"
end