MCPcopy Create free account
hub / github.com/brocode/fblog / load

Method load

src/config.rs:77–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 }
76 }
77 pub fn load() -> Option<Config> {
78 let mut config_file = dirs::config_dir()?;
79 config_file.push("fblog.toml");
80 let config_string = fs::read_to_string(config_file).ok()?;
81 match toml::from_str(&config_string) {
82 Ok(config) => Some(config),
83 Err(e) => {
84 panic!("Could not parse config file: {e}");
85 }
86 }
87 }
88 pub fn new() -> Config {
89 Config {
90 message_keys: default_message_keys(),

Callers 1

show_log_entryFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected