package config import ( "encoding/json" "flag" "log" "os" axlry "git.kundeng.us/phoenix/textsender-models/tx0/config/auxiliary" ) const ( App_Name = "sender" ) func IsVersionFlagPresent() bool { versionFlag := flag.Bool("version", false, "Print version information") flag.Parse() if *versionFlag { return true } else { return false } } func ParseConfig(filepath string) (config axlry.TwilioConfig, success bool) { content, err := os.ReadFile(filepath) log.Println("Reading config file...") log.Println(filepath) if err != nil { log.Println("An error reading the file") return } err = json.Unmarshal(content, &config) if err != nil { log.Println("An error occurred") return config, false } return config, true }