Oops
This commit is contained in:
parent
22c5179503
commit
157890be44
@ -60,7 +60,28 @@ fn subcmd_post(cmd: *getopt::command) void = {
|
||||
};
|
||||
};
|
||||
|
||||
// TODO
|
||||
let location = match(look_up_board(board)) {
|
||||
case let location: str =>
|
||||
yield location;
|
||||
case void =>
|
||||
fmt::errorf("{}: The board {} does not exist", name, board)!;
|
||||
return;
|
||||
};
|
||||
|
||||
let file = match(os::open(location, fs::flag::APPEND)) {
|
||||
case let file: io::file =>
|
||||
defer io::close(file);
|
||||
yield file;
|
||||
case let err: fs::error =>
|
||||
fmt::errorf(
|
||||
"{}: Can't make post: {}",
|
||||
name, fs::strerror(err));
|
||||
return;
|
||||
};
|
||||
|
||||
let user =
|
||||
|
||||
fmt::fprintf(file, "{}: {}", user, message)!;
|
||||
};
|
||||
|
||||
fn subcmd_read(cmd: *getopt::command) (void | errors::invalid) = {
|
||||
|
Loading…
Reference in New Issue
Block a user