pub fn write_output( output: Option<&Path>, content: &str, ) -> Result<(), CliError>
写输出到文件或 stdout
output 为 None 时打印到 stdout,为 Some(path) 时写入文件。
output
None
Some(path)