func Get() *jconfig.Config { if config == nil { if !flag.Parsed() { flag.Parse() } config = jconfig.LoadConfig(configPath) } return config }
func init() { config := jconfig.LoadConfig("careless.conf") ConsumerKey = config.GetString("ConsumerKey") ConsumerSecret = config.GetString("ConsumerSecret") AccessToken = config.GetString("AccessToken") AccessTokenSecret = config.GetString("AccessTokenSecret") DatabaseFile = config.GetString("DatabaseFile") DatabaseBucket = config.GetString("DatabaseBucket") }
func init() { accessKey = os.Getenv("AWS_SES_ACCESS_KEY") secretKey = os.Getenv("AWS_SES_SECRET_KEY") if accessKey == "" || secretKey == "" { config := jconfig.LoadConfig("/etc/aws.conf") if accessKey == "" { accessKey = config.GetString("aws_access_key") } if secretKey == "" { secretKey = config.GetString("aws_secret_key") } } }