MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / print_configured_settings

Function print_configured_settings

crates/chat-cli/src/cli/settings.rs:81–97  ·  view source on GitHub ↗

Print configured settings

(os: &Os, format: OutputFormat)

Source from the content-addressed store, hash-verified

79
80/// Print configured settings
81fn print_configured_settings(os: &Os, format: OutputFormat) -> Result<()> {
82 let settings = os.database.settings.map().clone();
83 match format {
84 OutputFormat::Plain => {
85 for (key, value) in settings {
86 println!("{key} = {value}");
87 }
88 },
89 OutputFormat::Json => {
90 println!("{}", serde_json::to_string(&settings)?);
91 },
92 OutputFormat::JsonPretty => {
93 println!("{}", serde_json::to_string_pretty(&settings)?);
94 },
95 }
96 Ok(())
97}
98
99/// Print internal state table dump (hidden debug feature)
100fn print_state_dump(os: &Os, format: OutputFormat) -> Result<()> {

Callers 1

executeMethod · 0.85

Calls 2

mapMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected