Skip to content

Commit

Permalink
chore: upgrade golangci-lint v1.56.1
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Szakaly <alex.szakaly@gmail.com>
  • Loading branch information
alex1989hu committed Feb 10, 2024
1 parent 4718d3c commit 50e31ba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.55.2
version: v1.56.1
2 changes: 1 addition & 1 deletion cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var (
Use: "serve",
Short: "Starts operator for Kubelet Serving Certificate Approver",
Long: "",
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
startServer()
},
}
Expand Down
14 changes: 7 additions & 7 deletions controller/certificatesigningrequest/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func TestReconcileValidCSR(t *testing.T) {
fakeClientset.Fake.PrependReactor(
"create",
"subjectaccessreviews",
func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
func(_ clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
sar := &authorizationv1.SubjectAccessReview{
Status: authorizationv1.SubjectAccessReviewStatus{
Allowed: true,
Expand Down Expand Up @@ -441,7 +441,7 @@ func TestReconcileParseCSRError(t *testing.T) {
fakeClientset.Fake.PrependReactor(
"create",
"subjectaccessreviews",
func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
func(_ clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
sar := &authorizationv1.SubjectAccessReview{
Status: authorizationv1.SubjectAccessReviewStatus{
Allowed: true,
Expand Down Expand Up @@ -498,7 +498,7 @@ func TestReconcileRecognizeError(t *testing.T) {
fakeClientset.Fake.PrependReactor(
"create",
"subjectaccessreviews",
func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
func(_ clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
return true, &authorizationv1.SubjectAccessReview{}, nil
})

Expand Down Expand Up @@ -548,7 +548,7 @@ func TestReconcileAuthorizationError(t *testing.T) {
fakeClientset.Fake.PrependReactor(
"create",
"subjectaccessreviews",
func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
func(_ clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
return true, &authorizationv1.SubjectAccessReview{}, errAuthorization
})

Expand Down Expand Up @@ -598,7 +598,7 @@ func TestReconcileAuthorizationDenied(t *testing.T) {
fakeClientset.Fake.PrependReactor(
"create",
"subjectaccessreviews",
func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
func(_ clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
sar := &authorizationv1.SubjectAccessReview{
Status: authorizationv1.SubjectAccessReviewStatus{
Allowed: false,
Expand Down Expand Up @@ -656,7 +656,7 @@ func TestReconcileUpdateApprovalError(t *testing.T) {
fakeClientset.Fake.PrependReactor(
"create",
"subjectaccessreviews",
func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
func(_ clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
sar := &authorizationv1.SubjectAccessReview{
Status: authorizationv1.SubjectAccessReviewStatus{
Allowed: true,
Expand All @@ -670,7 +670,7 @@ func TestReconcileUpdateApprovalError(t *testing.T) {
fakeClientset.Fake.PrependReactor(
"update",
"certificatesigningrequests",
func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
func(_ clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
return true, &certificatesv1.CertificateSigningRequest{}, errApprovalUpdate
})

Expand Down
2 changes: 1 addition & 1 deletion e2e/scenario_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type ApproverInstance struct {
func InitializeScenario(s *godog.ScenarioContext) {
var instance ApproverInstance

s.Before(func(ctx context.Context, sc *godog.Scenario) (context.Context, error) {
s.Before(func(ctx context.Context, _ *godog.Scenario) (context.Context, error) {
clientset, restConfig, err := createNewClientSet()
if err != nil {
return ctx, err
Expand Down

0 comments on commit 50e31ba

Please sign in to comment.