typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

refactor: use slices.Contains and slices.ContainsFunc to simplify code

Open tongjicoder opened this issue 6 months ago • 1 comments

There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.

tongjicoder avatar May 27 '25 06:05 tongjicoder

@microsoft-github-policy-service agree

tongjicoder avatar May 27 '25 06:05 tongjicoder

I'm going to close this; I think we're going to apply these using the new modernize tool by the Go team in bulk.

I'll also note that you sent this PR from your main branch; that is likely to cause problems if you want to send code to this repo, so I would suggest resetting your fork and sending future code via a different branch.

jakebailey avatar Jun 25 '25 00:06 jakebailey