Skip to content

Commit 38d1688

Browse files
committed
removed internal alias-type errors.IssuesIterator
1 parent 1900f58 commit 38d1688

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 3.11.7
2+
* Removed internal alias-type `errors.IssuesIterator`
3+
14
## 3.11.6
25
* Changed `trace.GetCredentialsDoneInfo` token representation from bool to string
36
* Added `log.Secret` helper for mask token

errors.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package ydb
22

33
import (
4+
"github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Issue"
5+
46
"github.com/ydb-platform/ydb-go-sdk/v3/internal/errors"
57
ratelimiterErrors "github.com/ydb-platform/ydb-go-sdk/v3/internal/ratelimiter/errors"
68
"github.com/ydb-platform/ydb-go-sdk/v3/ratelimiter"
@@ -15,12 +17,10 @@ func IterateByIssues(err error, it func(message string, code uint32, severity ui
1517
iterate(issues, it)
1618
}
1719

18-
func iterate(issues errors.IssueIterator, it func(message string, code uint32, severity uint32)) {
19-
l := issues.Len()
20-
for i := 0; i < l; i++ {
21-
issue, nested := issues.Get(i)
22-
it(issue.Message, issue.Code, issue.Severity)
23-
iterate(nested, it)
20+
func iterate(issues []*Ydb_Issue.IssueMessage, it func(message string, code uint32, severity uint32)) {
21+
for _, issue := range issues {
22+
it(issue.GetMessage(), issue.GetIssueCode(), issue.GetSeverity())
23+
iterate(issue.GetIssues(), it)
2424
}
2525
}
2626

internal/errors/operation.go

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ func NewOpError(opts ...oeOpt) error {
6565
return Errorf(2, "%w", oe)
6666
}
6767

68-
func (e *OpError) Issues() IssueIterator {
69-
return IssueIterator(e.issues)
68+
func (e *OpError) Issues() []*Ydb_Issue.IssueMessage {
69+
return e.issues
7070
}
7171

7272
func (e *OpError) Error() string {
@@ -83,17 +83,6 @@ func (e *OpError) Error() string {
8383
return buf.String()
8484
}
8585

86-
// nolint:unused, deadcode
87-
func iterateIssues(issues []*Ydb_Issue.IssueMessage, it func(Issue)) {
88-
for _, x := range issues {
89-
it(Issue{
90-
Message: x.GetMessage(),
91-
Code: x.GetIssueCode(),
92-
Severity: x.GetSeverity(),
93-
})
94-
}
95-
}
96-
9786
// IsOpError reports whether err is OpError with given code as the Reason.
9887
func IsOpError(err error, codes ...StatusCode) bool {
9988
var op *OpError

internal/meta/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package meta
22

33
const (
4-
Version = "ydb-go-sdk/3.11.6"
4+
Version = "ydb-go-sdk/3.11.7"
55
)

0 commit comments

Comments
 (0)