[#292] .golangci.yml: Add intrange linter, fix warnings
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
afbe15086f
commit
56c4aaaaca
5 changed files with 6 additions and 5 deletions
|
@ -64,5 +64,6 @@ linters:
|
||||||
- gocognit
|
- gocognit
|
||||||
- contextcheck
|
- contextcheck
|
||||||
- protogetter
|
- protogetter
|
||||||
|
- intrange
|
||||||
disable-all: true
|
disable-all: true
|
||||||
fast: false
|
fast: false
|
||||||
|
|
|
@ -286,13 +286,13 @@ func equalRecords(r1, r2 Record) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := range len(fs1) {
|
for i := range fs1 {
|
||||||
if !equalFilters(fs1[i], fs2[i]) {
|
if !equalFilters(fs1[i], fs2[i]) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := range len(ts1) {
|
for i := range ts1 {
|
||||||
if !equalTargets(ts1[i], ts2[i]) {
|
if !equalTargets(ts1[i], ts2[i]) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,7 +212,7 @@ func EqualTables(t1, t2 Table) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := range len(rs1) {
|
for i := range rs1 {
|
||||||
if !equalRecords(rs1[i], rs2[i]) {
|
if !equalRecords(rs1[i], rs2[i]) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ func equalTargets(t1, t2 Target) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := range len(keys1) {
|
for i := range keys1 {
|
||||||
if !bytes.Equal(keys1[i], keys2[i]) {
|
if !bytes.Equal(keys1[i], keys2[i]) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
@ -382,7 +382,7 @@ type SubTreeReader struct {
|
||||||
|
|
||||||
// Read reads another list of the subtree nodes.
|
// Read reads another list of the subtree nodes.
|
||||||
func (x *SubTreeReader) Read(buf []*grpcService.GetSubTreeResponse_Body) (int, error) {
|
func (x *SubTreeReader) Read(buf []*grpcService.GetSubTreeResponse_Body) (int, error) {
|
||||||
for i := range len(buf) {
|
for i := range buf {
|
||||||
resp, err := x.cli.Recv()
|
resp, err := x.cli.Recv()
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
return i, io.EOF
|
return i, io.EOF
|
||||||
|
|
Loading…
Reference in a new issue