diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-13 20:55:43 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-13 20:58:19 +0800 |
commit | a8823a83237291b903f85e7f8426cf5033314bbc (patch) | |
tree | fdfee2dbe770ed1bff27f2acb9b1b616e5e64f58 /main.ha | |
parent | Partially port templates used by the index page (diff) | |
download | forge-a8823a83237291b903f85e7f8426cf5033314bbc.tar.gz forge-a8823a83237291b903f85e7f8426cf5033314bbc.tar.zst forge-a8823a83237291b903f85e7f8426cf5033314bbc.zip |
Accept --config not --address
Diffstat (limited to '')
-rw-r--r-- | main.ha | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -18,8 +18,8 @@ use bufio; use strings; const usage: [_]getopt::help = [ - "HTTP server", - ('a', "address", "listened address") + "Lindenii Forge Server", + ('c', "config", "path to configuration file") ]; export fn main() void = { @@ -31,14 +31,7 @@ export fn main() void = { for (let opt .. cmd.opts) { switch (opt.0) { - case 'a' => - match (dial::splitaddr(opt.1, "")) { - case let value: (str, u16) => - ip_addr = ip::parsev4(value.0)!; - port = value.1; - case dial::invalid_address => - abort("invalid address"); - }; + case 'c' => yield; // TODO: actually handle the config case => abort(); // unreachable }; }; |