(line string)
| 12 | ) |
| 13 | |
| 14 | func parseAccessTokenLine(line string) *tokens.Secret { |
| 15 | line = strings.TrimSpace(line) |
| 16 | if line == "" || strings.HasPrefix(line, "#") { |
| 17 | return nil |
| 18 | } |
| 19 | parts := strings.SplitN(line, ":", 2) |
| 20 | token := strings.TrimSpace(parts[0]) |
| 21 | if token == "" { |
| 22 | return nil |
| 23 | } |
| 24 | return tokens.NewSecret(token) |
| 25 | } |
| 26 | |
| 27 | func readAccessToken() *tokens.AccessToken { |
| 28 | var Secrets []*tokens.Secret |
no test coverage detected