feat(meta): add about meta-command
This commit is contained in:
parent
c863d71409
commit
2dead7de0a
6 changed files with 39 additions and 5 deletions
|
|
@ -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",
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue