feat(meta): add about meta-command

This commit is contained in:
Khaïs COLIN 2025-05-30 15:48:02 +02:00
parent c863d71409
commit 2dead7de0a
Signed by: logistic-bot
SSH key fingerprint: SHA256:3zI3/tx0ZpCLHCLPmEaGR4oeYCPMCzQxXhXutBmtOAU
6 changed files with 39 additions and 5 deletions

View file

@ -2,13 +2,31 @@
use insta::assert_snapshot;
pub fn startup_msg() -> String {
let name = env!("CARGO_PKG_NAME");
let version = env!("CARGO_PKG_VERSION");
let authors = env!("CARGO_PKG_AUTHORS");
let about = about_msg();
let shorthelp = shorthelp_msg();
format!(
"{name} v{version} started.\n\
Copyright 2025 {authors}. All rights reserved."
"{about}\n\n\
Copyright 2025 {authors}. All rights reserved.\n\n\
{shorthelp}"
)
}
pub fn about_msg() -> String {
let name = env!("CARGO_PKG_NAME");
let version = env!("CARGO_PKG_VERSION");
format!(
"{name} v{version} -- A database engine\n\
Note: This is experimental software. No maintenance is intendend."
)
}
pub fn shorthelp_msg() -> String {
String::from(
"Type .license for licensing information\n\
Type .help for usage information",
)
}