the_code_graph_cli/commands/
callers.rs1use domain::error::Result;
2use domain::use_cases::query::QueryUseCase;
3
4use crate::commands::helpers::open_graph;
5use crate::commands::CallersArgs;
6use crate::output::{print, OutputFormat};
7
8pub fn run_callers(args: &CallersArgs, output_format: OutputFormat) -> Result<()> {
9 let (store, _root) = open_graph()?;
10 let uc = QueryUseCase::new(store.clone(), store);
11 let callers = uc.callers(&args.qualified_name)?;
12 print(&callers, output_format);
13 Ok(())
14}