Skip to content

Instantly share code, notes, and snippets.

View mysteriouspants's full-sized avatar
:shipit:
Help! I'm trapped in a fixed-width str

Christopher R. Miller mysteriouspants

:shipit:
Help! I'm trapped in a fixed-width str
View GitHub Profile
@mysteriouspants
mysteriouspants / command_map_example.rs
Created January 11, 2023 05:07
Example use of a subcommand dispatcher for the Clap argument parser
use std::error::Error;
use clap::{Arg, ArgMatches, builder::NonEmptyStringValueParser, Command};
use mysteriouspants_clap_action_command::{
ActionCommand, CommandMap, get_one, vec1::{Vec1, vec1}
};
static NAME_ARG: &str = "name";
struct HelloWorldCommand {}
@mysteriouspants
mysteriouspants / podman_system_service.rs
Last active April 23, 2023 19:52
start a podman system service and tie that child process to your podtender api layer
//! Start a Podman service socket.
use podtender::podman_service::PodmanService;
use std::{
env::{var, VarError},
io::Error as IOError,
ops::Deref,
sync::Arc,
time::{SystemTime, UNIX_EPOCH},
};