Add wsl linter and fix

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 14:51:08 +04:00
parent eedfdcecc8
commit 9156d6a16a
882 changed files with 6068 additions and 574 deletions

View File

@@ -52,6 +52,7 @@ func (s *Service) ImportFromDir(ctx context.Context, dataDir string) error {
}
code := strings.ToUpper(entry.Name())
var cc coredata.CountryCode
if err := cc.Scan(code); err != nil {
continue
@@ -64,6 +65,7 @@ func (s *Service) ImportFromDir(ctx context.Context, dataDir string) error {
if errors.Is(err, os.ErrNotExist) {
continue
}
if err != nil {
return fmt.Errorf("cannot parse CIDR file %s: %w", path, err)
}
@@ -166,9 +168,11 @@ func parseCIDRFile(path string) ([]string, error) {
if err != nil {
return nil, err
}
defer func() { _ = f.Close() }()
var cidrs []string
scanner := bufio.NewScanner(f)
for scanner.Scan() {