Kill socket, read/write subcommands
Redundant with channels Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
3b15c690ec
commit
120ffabfaa
3 changed files with 0 additions and 335 deletions
|
|
@ -723,29 +723,6 @@ pub enum SubCmd {
|
|||
pub async fn main() {
|
||||
let cli = CliArgs::parse();
|
||||
|
||||
match &cli.command {
|
||||
Some(SubCmd::Read { follow, block }) => {
|
||||
if let Err(e) = crate::mind::log::cmd_read_inner(*follow, *block, cli.debug).await {
|
||||
eprintln!("{:#}", e);
|
||||
std::process::exit(1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
Some(SubCmd::Write { message }) => {
|
||||
let msg = message.join(" ");
|
||||
if msg.is_empty() {
|
||||
eprintln!("Usage: consciousness write <message>");
|
||||
std::process::exit(1);
|
||||
}
|
||||
if let Err(e) = crate::mind::log::cmd_write(&msg, cli.debug).await {
|
||||
eprintln!("{:#}", e);
|
||||
std::process::exit(1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
|
||||
if cli.show_config {
|
||||
match crate::config::load_app(&cli) {
|
||||
Ok((app, figment)) => crate::config::show_config(&app, &figment),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue