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

Function write_string_list

atomic-cli/src/commands/op/output.rs:530–539  ·  view source on GitHub ↗
(output: &mut String, indent: usize, label: &str, values: &[String])

Source from the content-addressed store, hash-verified

528}
529
530fn write_string_list(output: &mut String, indent: usize, label: &str, values: &[String]) {
531 writeln!(output, "{}{}:", spaces(indent), label).unwrap();
532 if values.is_empty() {
533 writeln!(output, "{}none", spaces(indent + 2)).unwrap();
534 } else {
535 for value in values {
536 writeln!(output, "{}- {value}", spaces(indent + 2)).unwrap();
537 }
538 }
539}
540
541fn write_key_value(output: &mut String, indent: usize, key: &str, value: &str) {
542 writeln!(output, "{}{key}: {value}", spaces(indent)).unwrap();

Callers 2

render_log_humanFunction · 0.85
render_details_humanFunction · 0.85

Calls 2

unwrapMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected