MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / print_projects

Function print_projects

src/project_cmd.rs:76–94  ·  view source on GitHub ↗
(
    label: &str,
    projects: Vec<CodeProjectRecord>,
    limit: usize,
    json_output: bool,
)

Source from the content-addressed store, hash-verified

74}
75
76fn print_projects(
77 label: &str,
78 projects: Vec<CodeProjectRecord>,
79 limit: usize,
80 json_output: bool,
81) -> Result<()> {
82 if json_output {
83 println!(
84 "{}",
85 serde_json::to_string_pretty(&json!({
86 "limit": limit,
87 "projects": projects,
88 }))?
89 );
90 } else {
91 print_project_table(label, &projects);
92 }
93 Ok(())
94}
95
96fn print_project_table(label: &str, projects: &[CodeProjectRecord]) {
97 if projects.is_empty() {

Callers 1

handle_projects_actionFunction · 0.85

Calls 1

print_project_tableFunction · 0.85

Tested by

no test coverage detected