diff options
| author | ยท๐๐ด๐๐๐ฉ๐ค | 2025-12-11 20:40:39 +0000 |
|---|---|---|
| committer | ยท๐๐ด๐๐๐ฉ๐ค | 2025-12-11 20:40:39 +0000 |
| commit | 4a5eecec6f54f2049d01e28ef220a98ef71f5896 (patch) | |
| tree | d84fe99a989c9e0f509243e92bb7a259ec98f1ea /lib | |
| parent | 5d921bff60bd8a11043d1d7f957418e9166ffac7 (diff) | |
| download | nixtaml-4a5eecec6f54f2049d01e28ef220a98ef71f5896.tar nixtaml-4a5eecec6f54f2049d01e28ef220a98ef71f5896.tar.gz nixtaml-4a5eecec6f54f2049d01e28ef220a98ef71f5896.tar.bz2 nixtaml-4a5eecec6f54f2049d01e28ef220a98ef71f5896.tar.lz nixtaml-4a5eecec6f54f2049d01e28ef220a98ef71f5896.tar.xz nixtaml-4a5eecec6f54f2049d01e28ef220a98ef71f5896.tar.zst nixtaml-4a5eecec6f54f2049d01e28ef220a98ef71f5896.zip | |
better URI generator
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lockfile.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/lockfile.ml b/lib/lockfile.ml index 7b9909a..3e2758e 100644 --- a/lib/lockfile.ml +++ b/lib/lockfile.ml @@ -20,7 +20,10 @@ module Uri = struct let* host = string_size ~gen: a_to_z (int_bound 20) in let* tld = string_size ~gen: a_to_z (int_bound 5) in let* path_opt = option (string_size ~gen: a_to_z (int_bound 10)) in - let uri = Uri.of_string Fmt.(str "%s://%s.%s/%a" scheme host tld (option string) path_opt) in + let uri = + Uri.of_string @@ + Fmt.str "%s://%s.%s/%s" scheme host tld (Option.value ~default: "" path_opt) + in return uri end |
