init
This commit is contained in:
commit
973c19f148
7 changed files with 95 additions and 0 deletions
20
internal/config/config.go
Normal file
20
internal/config/config.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Token string
|
||||
}
|
||||
|
||||
func NewConfig() *Config {
|
||||
config := &Config{}
|
||||
_ = godotenv.Load()
|
||||
|
||||
config.Token = os.Getenv("BOT_TOKEN")
|
||||
|
||||
return config
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue