-
Notifications
You must be signed in to change notification settings - Fork 3
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
Re-enable linters in CLI #253
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #253 +/- ##
=====================================
Coverage 6.29% 6.29%
=====================================
Files 5 5
Lines 254 254
=====================================
Hits 16 16
Misses 238 238 ☔ View full report in Codecov by Sentry. |
src/cmd/graphql.go
Outdated
@@ -9,9 +9,10 @@ import ( | |||
"strconv" | |||
"strings" | |||
|
|||
"github.com/pkg/errors" |
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.
"github.com/pkg/errors"
is a publicly archived project with a release date of 4 years ago.
If we really want the slick error wrapping feature, let's just pull the good stuff out of that repo and add it inside of handleErr()
.
That also gets us one step closer to a "unified error message" if that's a long term goal
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.
If we want to beef up error messages that's all good, let's just do that without adding an archived dependency
@@ -169,13 +172,6 @@ func init() { | |||
graphqlCmd.Flags().StringArrayP("field", "f", nil, "Add a variable in `key=value` format") | |||
} | |||
|
|||
func handleErr(msg string, err 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.
We can add cobra.CheckErr()
once here
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.
@davidbloss restored that function and removed all mentions of errors
package. Now using fmt.Errorf
everywhere to make errors, which is the idiomatic way.
d59fafe
to
9d9e107
Compare
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! 🎉
Depends on #241