From 6cf6800bffd4830c4fbc360083d19d6e44326250 Mon Sep 17 00:00:00 2001 From: Cain <75994858+cainthebest@users.noreply.github.com> Date: Sat, 13 Jan 2024 11:21:41 +0000 Subject: [PATCH] chore: add source link --- crates/cli/src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index acd68fa..b3eb937 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -78,6 +78,9 @@ enum Action { #[command(flatten, next_help_heading = "Query options")] extra_options: Option, }, + + /// Check out the source code + Source, /// Display the MIT License information License, } @@ -224,6 +227,13 @@ fn main() -> Result<()> { let result = query_with_timeout_and_extra_settings(game, &ip, port, timeout_settings, extra_options)?; output_result(output_mode, json, result.as_ref()); } + Action::Source => { + println!("{}", GAMEDIG_HEADER); + + // Print the source code location + println!("Source code: https://github.com/gamedig/rust-gamedig\n"); + println!("Be sure to leave a star if you like the project :)\n"); + } Action::License => { // Bake the license into the binary // so we don't have to ship it separately