fix: grammer
This commit is contained in:
parent
de65440503
commit
7b276bd38d
@ -65,7 +65,7 @@ pub fn handle_daemon_client(mut stream: UnixStream, config: &Arc<config::Schema>
|
|||||||
"help" => {
|
"help" => {
|
||||||
_ = writeln!(
|
_ = writeln!(
|
||||||
stream,
|
stream,
|
||||||
"avaliable commands:\n help\n configcount\n confdump\n hosts <list|create|delete> ..."
|
"available commands:\n help\n configcount\n confdump\n hosts <list|create|delete> ..."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
"configcount" => {
|
"configcount" => {
|
||||||
@ -81,7 +81,7 @@ pub fn handle_daemon_client(mut stream: UnixStream, config: &Arc<config::Schema>
|
|||||||
if let [arg0, args @ ..] = args {
|
if let [arg0, args @ ..] = args {
|
||||||
match arg0.as_str() {
|
match arg0.as_str() {
|
||||||
"list" => {
|
"list" => {
|
||||||
_ = writeln!(stream, "aquiring read lock");
|
_ = writeln!(stream, "acquiring read lock");
|
||||||
let rlock = config.hosts.read();
|
let rlock = config.hosts.read();
|
||||||
_ = writeln!(stream, "{rlock:#?}");
|
_ = writeln!(stream, "{rlock:#?}");
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ pub fn handle_daemon_client(mut stream: UnixStream, config: &Arc<config::Schema>
|
|||||||
{
|
{
|
||||||
match value.parse::<net::SocketAddr>() {
|
match value.parse::<net::SocketAddr>() {
|
||||||
Ok(addr) => {
|
Ok(addr) => {
|
||||||
_ = writeln!(stream, "aquiring write lock");
|
_ = writeln!(stream, "acquiring write lock");
|
||||||
let mut wlock = config.hosts.write();
|
let mut wlock = config.hosts.write();
|
||||||
wlock.insert(
|
wlock.insert(
|
||||||
name.to_string(),
|
name.to_string(),
|
||||||
@ -106,7 +106,7 @@ pub fn handle_daemon_client(mut stream: UnixStream, config: &Arc<config::Schema>
|
|||||||
Err(err) => {
|
Err(err) => {
|
||||||
_ = writeln!(
|
_ = writeln!(
|
||||||
stream,
|
stream,
|
||||||
"err: parsing value as socket addres {err:?}"
|
"err: parsing value as socket address {err:?}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@ pub fn handle_daemon_client(mut stream: UnixStream, config: &Arc<config::Schema>
|
|||||||
}
|
}
|
||||||
"delete" => {
|
"delete" => {
|
||||||
if let [name] = args {
|
if let [name] = args {
|
||||||
_ = writeln!(stream, "aquiring write lock");
|
_ = writeln!(stream, "acquiring write lock");
|
||||||
let mut wlock = config.hosts.write();
|
let mut wlock = config.hosts.write();
|
||||||
wlock.remove(name);
|
wlock.remove(name);
|
||||||
let lock = RwLockWriteGuard::downgrade(wlock);
|
let lock = RwLockWriteGuard::downgrade(wlock);
|
||||||
|
@ -42,7 +42,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
File::create(args.config)
|
File::create(args.config)
|
||||||
.context("failure creating the config file")?
|
.context("failure creating the config file")?
|
||||||
.write_all(constants::DEFAULT_CONFIG)
|
.write_all(constants::DEFAULT_CONFIG)
|
||||||
.context("failure writting the contents to the config file")?;
|
.context("failure writing the contents to the config file")?;
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ pub enum ClientError {
|
|||||||
// auth headers are just added depending on the ID cookie soo, keep a hashmap of IDs and user
|
// auth headers are just added depending on the ID cookie soo, keep a hashmap of IDs and user
|
||||||
// data??
|
// data??
|
||||||
//
|
//
|
||||||
// check authethication first of everything as it changes decissions on eveything and give it to fn
|
// check authentication first of everything as it changes decisions on everything and give it to fn
|
||||||
// too
|
// too
|
||||||
// fn(req, Option<AuthData>, (adrr, etc)) -> Action
|
// fn(req, Option<AuthData>, (adrr, etc)) -> Action
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user