Set up a client and basic command infrastructure

This commit is contained in:
Marc Plano-Lesay 2024-10-24 11:55:16 +11:00
parent 56a22203ef
commit 46338adca4
6 changed files with 278 additions and 1 deletions

1
src/commands/mod.rs Normal file
View file

@ -0,0 +1 @@
pub mod server_version;

View file

@ -0,0 +1,9 @@
use anyhow::Result;
use crate::Client;
pub async fn server_version(client: &Client) -> Result<()> {
let version = client.get_server_version().await?;
println!("{}.{}.{}", version.major, version.minor, version.patch);
Ok(())
}