kubernetes-csi / external-snapshotter

Sidecar container that watches Kubernetes Snapshot CRD objects and triggers CreateSnapshot/DeleteSnapshot against a CSI endpoint.
Apache License 2.0
471 stars 363 forks source link

replace custom ContainsString() with standard slices.Contains() #1049

Closed nixpanic closed 4 months ago

nixpanic commented 5 months ago

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change /kind bug

/kind cleanup

/kind design /kind documentation /kind failing-test /kind feature /kind flake

What this PR does / why we need it:

With Go 1.21 the "slices" package can be used for many operations on slices. The custom ContainsString() function can be replaced by the standard slices.Contains().

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE
xing-yang commented 4 months ago

/lgtm /approve

k8s-ci-robot commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nixpanic, xing-yang

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: - ~~[OWNERS](https://github.com/kubernetes-csi/external-snapshotter/blob/master/OWNERS)~~ [xing-yang] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment