diff options
| -rw-r--r-- | curl.ha | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,6 @@ use types::c; use fmt; +use os; export type CURL = opaque; export type CURLcode = int; @@ -46,7 +47,10 @@ fn get(url: str) (void | curlerror) = { }; export fn main() void = { - match (get("https://harelang.org")) { + if (len(os::args) != 2) { + fmt::fatalf("USAGE: {} <url>", os::args[0]); + }; + match (get(os::args[1])) { case void => yield; case let err: curlerror => |
