mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
add with_about for CLI commands (#2741)
* add with_about for echo, server, and auth * update for feedback * finish (most) remaining command documentation * update comments after additional clarification * add expanded_api descriptions * add comments for action_api * add comments for remaining apis * add comment for package-rebuild * fix build errors * missed one with_about * add context to git-info subcommands * remove context from git-info subcommands * Make git-info from_fns generic over context * make version::git_info generic over the context * try removing generics from subcommand and version::git_info * try adding a closure with context * Updates for reviewer feedback
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use rpc_toolkit::{Context, ParentHandler};
|
||||
use rpc_toolkit::{Context, HandlerExt, ParentHandler};
|
||||
|
||||
pub mod dhcp;
|
||||
pub mod dns;
|
||||
@@ -20,6 +20,12 @@ pub const PACKAGE_CERT_PATH: &str = "/var/lib/embassy/ssl";
|
||||
|
||||
pub fn net<C: Context>() -> ParentHandler<C> {
|
||||
ParentHandler::new()
|
||||
.subcommand("tor", tor::tor::<C>())
|
||||
.subcommand("dhcp", dhcp::dhcp::<C>())
|
||||
.subcommand(
|
||||
"tor",
|
||||
tor::tor::<C>().with_about("Tor commands such as list-services, logs, and reset"),
|
||||
)
|
||||
.subcommand(
|
||||
"dhcp",
|
||||
dhcp::dhcp::<C>().with_about("Command to update IP assigned from dhcp"),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user