()
| 9 | ) |
| 10 | |
| 11 | func InitAuth() { |
| 12 | var Secrets []*groq.Account |
| 13 | // Read accounts.txt and create a list of accounts |
| 14 | if _, err := os.Stat("session_tokens.txt"); err == nil { |
| 15 | // Each line is a proxy, put in proxies array |
| 16 | file, _ := os.Open("session_tokens.txt") |
| 17 | defer file.Close() |
| 18 | scanner := bufio.NewScanner(file) |
| 19 | for scanner.Scan() { |
| 20 | // Split by : |
| 21 | token := scanner.Text() |
| 22 | if len(token) == 0 { |
| 23 | continue |
| 24 | } |
| 25 | // Append to accounts |
| 26 | Secrets = append(Secrets, groq.NewAccount(token, "")) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | global.AccountPool = accountpool.NewAccounts(Secrets) |
| 31 | } |
no test coverage detected