Skip to content

refactor: use slices.Contains to simplify code#1380

Merged
lcarva merged 1 commit into
tektoncd:mainfrom
jinjingroad:main
Jun 20, 2025
Merged

refactor: use slices.Contains to simplify code#1380
lcarva merged 1 commit into
tektoncd:mainfrom
jinjingroad:main

Conversation

@jinjingroad

@jinjingroad jinjingroad commented Jun 19, 2025

Copy link
Copy Markdown
Contributor

Changes

In Go 1.21, the standard library includes built-in max/min function, which can greatly simplify the code.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

None

Signed-off-by: jinjingroad <jinjingroad@sina.com>
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 19, 2025

Copy link
Copy Markdown

CLA Signed


The committers listed above are authorized under a signed CLA.

@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 19, 2025
@tekton-robot

Copy link
Copy Markdown

Hi @jinjingroad. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@jinjingroad

Copy link
Copy Markdown
Contributor Author

CLA Not Signed

Signed.

@PuneetPunamiya

Copy link
Copy Markdown
Member

/approve

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2025
@tekton-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lcarva, PuneetPunamiya

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [PuneetPunamiya,lcarva]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lcarva

lcarva commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

It seems there are some issues in test/clients.go which is unrelated to this PR. Merging.

@lcarva lcarva merged commit 85586f0 into tektoncd:main Jun 20, 2025
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants