Set up a client and basic command infrastructure
This commit is contained in:
parent
56a22203ef
commit
46338adca4
6 changed files with 278 additions and 1 deletions
1
src/commands/mod.rs
Normal file
1
src/commands/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod server_version;
|
9
src/commands/server_version.rs
Normal file
9
src/commands/server_version.rs
Normal 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(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue