MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / parse_patterns

Function parse_patterns

atomic-cli/src/commands/identity/agent/mod.rs:175–181  ·  view source on GitHub ↗

Parse a comma-separated pattern list, dropping blanks.

(raw: &str)

Source from the content-addressed store, hash-verified

173
174/// Parse a comma-separated pattern list, dropping blanks.
175pub fn parse_patterns(raw: &str) -> Vec<String> {
176 raw.split(',')
177 .map(str::trim)
178 .filter(|s| !s.is_empty())
179 .map(str::to_string)
180 .collect()
181}
182
183/// Parse a duration like `30d`, `12h`, `90m`, or a bare number of days.
184pub fn parse_duration(raw: &str) -> CliResult<Duration> {

Callers 1

next_scopeMethod · 0.85

Calls 2

collectMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected