diff --git a/.gitignore b/.gitignore index 7bc433a..f81414b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ coverage/* test_monitor.txt bin -.vscode \ No newline at end of file +.vscode +.notes +bin \ No newline at end of file diff --git a/main.go b/main.go index 9c64eb4..d99b5e1 100644 --- a/main.go +++ b/main.go @@ -15,8 +15,12 @@ import ( ) func main() { - config := cfg.NewConfig("./.env") + envFile := "" + if os.Getenv("ENV") != "prod" { + envFile = "./.env" + } + config := cfg.NewConfig(envFile) log.SetFlags(log.Lmicroseconds) if config.LogFile { logFileName := fmt.Sprintf("%s.txt", time.Now().Format(strings.ReplaceAll(time.RFC1123Z, ":", "_"))) @@ -67,7 +71,7 @@ func main() { mainFrame := page.MustElement("#mainFrame").MustFrame() mainFrame.MustElement("#wlanEnable").MustClick() log.Println("wlanEnable DONE") - + return mainFrame.MustElement("#sysSubmit").MustClick() // TODO: improve this and wait until something should happens (refresh) time.Sleep(time.Second * 3)