generated from PenaSide/GolangTemplate
-
This commit is contained in:
parent
b1bcf42af6
commit
c6c9c817ec
@ -117,15 +117,15 @@ func loadConfig() (*models.Config, error) {
|
||||
TrashLogHost: os.Getenv("TRASH_LOG_HOST"),
|
||||
ModuleLogger: os.Getenv("MODULE_LOGGER"),
|
||||
NotificationBotToken: os.Getenv("NOTIFICATION_BOT_TOKEN"),
|
||||
NotificationRsPayChannel: envTiInt64(os.Getenv("NOTIFICATION_RS_PAY_CHANNEL")),
|
||||
NotificationChannel: envTiInt64(os.Getenv("NOTIFICATION_CHANNEL")),
|
||||
NotificationRsPayChannel: envToInt64(os.Getenv("NOTIFICATION_RS_PAY_CHANNEL")),
|
||||
NotificationChannel: envToInt64(os.Getenv("NOTIFICATION_CHANNEL")),
|
||||
AdminURL: os.Getenv("ADMIN_FRONT_URL"),
|
||||
}
|
||||
|
||||
return &config, nil
|
||||
}
|
||||
|
||||
func envTiInt64(str string) int64 {
|
||||
func envToInt64(str string) int64 {
|
||||
n, err := strconv.ParseInt(str, 10, 64)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
Loading…
Reference in New Issue
Block a user