Skip to content

Commit

Permalink
Merge pull request #8 from alpkeskin/fix-proxy-reader
Browse files Browse the repository at this point in the history
Fix proxy reader
  • Loading branch information
alpkeskin authored Jan 13, 2025
2 parents 7d04061 + 2f788aa commit 152ab83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Tests

on:
push:
branches:
- main
- v*

jobs:
test:
Expand Down
4 changes: 4 additions & 0 deletions internal/proxy/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func (pl *ProxyLoader) Load() error {
content = strings.ReplaceAll(content, "\r\n", "\n")
lines := strings.Split(content, "\n")
for _, line := range lines {
line = strings.TrimSpace(line)
if line == "" {
continue
}
proxy, err := pl.CreateProxy(line)
if err != nil {
slog.Error(msgFailedToCreateProxy, "error", err, "proxy", line)
Expand Down

0 comments on commit 152ab83

Please sign in to comment.