MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / sanitize_name

Function sanitize_name

crates/openshell-cli/src/tls.rs:149–160  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

147}
148
149fn sanitize_name(value: &str) -> String {
150 value
151 .chars()
152 .map(|ch| {
153 if ch.is_ascii_alphanumeric() || matches!(ch, '.' | '-' | '_') {
154 ch
155 } else {
156 '_'
157 }
158 })
159 .collect()
160}
161
162fn xdg_config_dir() -> Result<PathBuf> {
163 openshell_core::paths::xdg_config_dir()

Callers 2

tls_dir_for_gatewayFunction · 0.85
default_tls_dirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected