🔧 Implement the TelegramConfig
This commit is contained in:
parent
91843e34e4
commit
6001cdba88
14
config/telegram.go
Normal file
14
config/telegram.go
Normal file
@ -0,0 +1,14 @@
|
||||
package config
|
||||
|
||||
import "github.com/caarlos0/env"
|
||||
|
||||
type TelegramConfig struct {
|
||||
TelegramKey string `env:"TELEGRAM_KEY,required"`
|
||||
}
|
||||
|
||||
func (tc *TelegramConfig) LoadConfig() error {
|
||||
if err := env.Parse(tc); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user