Skip to content

Commit 40bb25e

Browse files
authored
Merge pull request #1021 from grishagavrin/master enable nilerr linter
2 parents 3e35c78 + d2d3fc8 commit 40bb25e

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ linters:
234234
- ireturn
235235
- maintidx
236236
- maligned
237-
- nilerr
238237
- nlreturn
239238
- nonamedreturns
240239
- paralleltest

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* Refactored nil on err `internal/grpcwrapper/rawydb/issues.go`, when golangci-lint nilerr enabled
2+
* Refactored nil on err `internal/grpcwrapper/rawtopic/describe_topic.go`, when golangci-lint nilerr enabled
3+
14
## v3.55.2
25
* Fixed init info in topic writer, when autoseq num turned off.
36

internal/grpcwrapper/rawtopic/describe_topic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type DescribeTopicResult struct {
4343

4444
func (res *DescribeTopicResult) FromProto(protoResponse *Ydb_Topic.DescribeTopicResponse) error {
4545
if err := res.Operation.FromProtoWithStatusCheck(protoResponse.Operation); err != nil {
46-
return nil
46+
return err
4747
}
4848

4949
protoResult := &Ydb_Topic.DescribeTopicResult{}

internal/grpcwrapper/rawydb/issues.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func (issuesPointer *Issues) FromProto(p []*Ydb_Issue.IssueMessage) error {
1717
issues := *issuesPointer
1818
for i := range issues {
1919
if err := issues[i].FromProto(p[i]); err != nil {
20-
return nil
20+
return err
2121
}
2222
}
2323
return nil

0 commit comments

Comments
 (0)