diff --git a/Botrun/BotStart.go b/Botrun/BotStart.go index d3e0571..63a5c6d 100644 --- a/Botrun/BotStart.go +++ b/Botrun/BotStart.go @@ -43,7 +43,7 @@ var ( var encryptionKey []byte func init() { - godotenv.Load("/home/Jannik/Documents/Code/Go/Untis/Untis-Logger/.env") + godotenv.Load(".env") keyStr := os.Getenv("ENC_KEY") if keyStr == "" { panic("ENC_KEY environment variable not set") diff --git a/main.go b/main.go index 23c721d..3751813 100644 --- a/main.go +++ b/main.go @@ -34,6 +34,7 @@ type NamedTimetableEntry struct { // init and main// func init() { + godotenv.Load(".env") err := godotenv.Load() if err != nil { log.Printf("Error loading .env file: %v", err) @@ -51,6 +52,7 @@ func init() { } func main() { + godotenv.Load(".env") //Untis.Main() //starting API calls function| happens in schedule func //Run() //Starts logging the timetable for each new Lesson and logs changes