diff --git a/src/config/mod.rs b/src/config/mod.rs index 5bfde8e..b0c8d67 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1,4 +1,3 @@ - pub const APP_NAME: &str = "sender"; pub fn get_paths(args: &Vec) -> (String, String, String) { @@ -21,32 +20,29 @@ pub async fn parse_config() -> (textsender_models::config::auxiliary::TwilioConf (config, true) } - - - /* - axlry "git.kundeng.us/phoenix/textsender-models/tx0/config/auxiliary" + axlry "git.kundeng.us/phoenix/textsender-models/tx0/config/auxiliary" ) func ParseConfig(filepath string) (config axlry.TwilioConfig, success bool) { - content, err := os.ReadFile(filepath) + content, err := os.ReadFile(filepath) - log.Println("Reading config file...") - log.Println(filepath) + log.Println("Reading config file...") + log.Println(filepath) - if err != nil { - log.Println("An error reading the file") - return - } + if err != nil { + log.Println("An error reading the file") + return + } - err = json.Unmarshal(content, &config) + err = json.Unmarshal(content, &config) - if err != nil { - log.Println("An error occurred") - return config, false - } + if err != nil { + log.Println("An error occurred") + return config, false + } - return config, true + return config, true } */ @@ -57,9 +53,21 @@ mod tests { fn test_parse_config() { let (config, success) = async_std::task::block_on(super::parse_config()); assert!(success, "Config was not parsed"); - assert_eq!(false, config.account_sid.is_empty(), "Account SID is missing"); + assert_eq!( + false, + config.account_sid.is_empty(), + "Account SID is missing" + ); assert_eq!(false, config.auth_token.is_empty(), "AUTH TOKEN is missing"); - assert_eq!(false, config.phone_number.is_empty(), "Phone Number is missing"); - assert_eq!(false, config.service_sid.is_empty(), "Service SID is missing"); + assert_eq!( + false, + config.phone_number.is_empty(), + "Phone Number is missing" + ); + assert_eq!( + false, + config.service_sid.is_empty(), + "Service SID is missing" + ); } } diff --git a/src/messaging/mod.rs b/src/messaging/mod.rs index e69de29..8b13789 100644 --- a/src/messaging/mod.rs +++ b/src/messaging/mod.rs @@ -0,0 +1 @@ +