-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[patch] remove cockroachdb/errors #677
Conversation
Signed-off-by: kpango <i.can.feel.gravity@gmail.com>
Best reviewed: commit by commit
Optimal code review plan (1 warning)
|
[CHATOPS:HELP] ChatOps commands.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
internal/errors/errors.go
Outdated
} | ||
return nil | ||
} | ||
|
||
Unwrap = func(err error) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
Unwrap
is a global variable (gochecknoglobals)
Is = errors.Is | ||
UnWrapOnce = errbase.UnwrapOnce | ||
UnWrapAll = errbase.UnwrapAll | ||
As = errors.As |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
As
is a global variable (gochecknoglobals)
internal/errors/errors.go
Outdated
UnWrapOnce = errbase.UnwrapOnce | ||
UnWrapAll = errbase.UnwrapAll | ||
As = errors.As | ||
Is = errors.Is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
Is
is a global variable (gochecknoglobals)
Codecov Report
@@ Coverage Diff @@
## master #677 +/- ##
==========================================
+ Coverage 15.38% 15.60% +0.21%
==========================================
Files 412 413 +1
Lines 21598 21660 +62
==========================================
+ Hits 3323 3379 +56
- Misses 18027 18030 +3
- Partials 248 251 +3
Continue to review full report at Codecov.
|
internal/errors/errors.go
Outdated
} | ||
return nil | ||
} | ||
|
||
Unwrap = func(err error) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
unlambda: replace `func(err error) error {
39b09d3
to
ecfa457
Compare
Signed-off-by: kpango <i.can.feel.gravity@gmail.com>
ecfa457
to
74920f0
Compare
Is = errors.Is | ||
UnWrapOnce = errbase.UnwrapOnce | ||
UnWrapAll = errbase.UnwrapAll | ||
Is = func(err, target error) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
Is
is a global variable (gochecknoglobals)
@@ -101,7 +101,7 @@ func TestGet(t *testing.T) { | |||
} | |||
defaultCheckFunc := func(w want, got Detail) error { | |||
if !reflect.DeepEqual(got, w.want) { | |||
return errors.Errorf("got = %v, want %v", got, w.want) | |||
return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
copylocks: call of errors.Errorf copies lock value: github.com/vdaas/vald/internal/info.Detail contains sync.Once contains sync.Mutex (govet)
@@ -293,7 +293,7 @@ func TestDetail_Get(t *testing.T) { | |||
} | |||
defaultCheckFunc := func(w want, got Detail) error { | |||
if !reflect.DeepEqual(got, w.want) { | |||
return errors.Errorf("got = %v, want %v", got, w.want) | |||
return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
copylocks: call of errors.Errorf copies lock value: github.com/vdaas/vald/internal/info.Detail contains sync.Once contains sync.Mutex (govet)
internal/errors/errors.go
Outdated
} | ||
return nil | ||
} | ||
|
||
Unwrap = func(err error) error { return errors.Unwrap(err) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
unlambda: replace func(err error) error { return errors.Unwrap(err) }
with errors.Unwrap
(gocritic)
6a11eb5
to
7342ba4
Compare
[WARNING:INTCFG] Changes in |
7342ba4
to
5a42815
Compare
Signed-off-by: kpango <i.can.feel.gravity@gmail.com>
5a42815
to
d79b6b4
Compare
@@ -349,8 +349,7 @@ | |||
"format": "int64" | |||
}, | |||
"indexing": { | |||
"type": "boolean", | |||
"format": "boolean" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why these swagger files updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't know, I just run make update for dependencies update.
may be swagger version ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked swagger specification, there is not format field for boolean type.
maybe old version has format for boolean type.
FYI: https://swagger.io/specification/#data-types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rinx (mention for FYI) and I'll merge this PR
Signed-off-by: kpango i.can.feel.gravity@gmail.com
Description:
remove cockroachdb/errors for license problem
Related Issue:
How Has This Been Tested?:
Environment:
Types of changes:
Changes to Core Features:
Checklist: