-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix: use fmt.Errorf
instead of non-existing errors.New
#5651
Conversation
When kubernetes-sigs#5525 merged, it referenced `errors.New` function but that function doesn't exist. This PR replaces the call with simple `fmt.Errorf`.
Hi @tigrato. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@varshaprasad96 sorry for the trouble but somehow I failed to verify if it compiled in the latest version I submitted. Can you please prioritize this merge? |
errors.New
fmt.Errorf
instead of non-exising errors.New
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
@tigrato could you add some basic testing to this new function that would be able to catch the issue? |
This PR has multiple commits, and the default merge method is: merge. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@stormqueen1990 I added a small lint step that checks the |
Makefile
Outdated
export KUSTOMIZE_ROOT ?= $(shell pwd | sed -E 's|(.*\/kustomize)/(.*)|\1|') | ||
.PHONY: lint-api-static | ||
lint-api-static: $(MYGOBIN)/golangci-lint $(MYGOBIN)/goimports $(builtinplugins) | ||
cd api && \ | ||
$(MYGOBIN)/golangci-lint \ | ||
-c $$KUSTOMIZE_ROOT/.golangci.yml \ | ||
--build-tags kustomize_disable_go_plugin_support \ | ||
-D exhaustive \ | ||
--path-prefix api \ | ||
run ./... | ||
|
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.
Since this is specific to api
, it should go in api/Makefile
instead.
The specific module Makefile
s already have KUSTOMIZE_ROOT
imported, so it's not needed to redefine it.
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.
Moved in 33dc9be
Thanks
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
/retitle fix: use |
fmt.Errorf
instead of non-exising errors.New
fmt.Errorf
instead of non-existing errors.New
/ok-to-test |
/label tide/merge-method-squash |
Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: koba1t, tigrato The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
When #5525 merged, it referenced
errors.New
function but that function doesn't exist. This PR replaces the call with simplefmt.Errorf
.