Skip to content

Commit

Permalink
HW10 linter
Browse files Browse the repository at this point in the history
  • Loading branch information
DimVlas authored and DimVlas committed Dec 25, 2024
1 parent a829e48 commit 804a6ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ linters-settings:
- github.com/DimVlas/otus_hw/hw09_struct_validator/rules
- github.com/stretchr/testify/require
- github.com/stretchr/testify/assert
- github.com/mailru/easyjson
- $gostd
exhaustive:
explicit-exhaustive-switch: true
Expand Down
6 changes: 3 additions & 3 deletions hw10_program_optimization/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package hw10programoptimization

import (
"bufio"
"errors"
"io"
"strings"

Expand Down Expand Up @@ -33,10 +34,9 @@ func domainsStat(r io.Reader, domain string) (DomainStat, error) {
for {
line, err := rd.ReadBytes('\n')
if err != nil {
switch err {
case io.EOF:
if !errors.Is(err, io.EOF) {
br = true
default:
} else {
return nil, err
}
}
Expand Down

0 comments on commit 804a6ce

Please sign in to comment.