-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Open
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.RefactoringIssues related to refactoring toolsIssues related to refactoring toolsToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Milestone
Description
[Update: CutPrefix was done by https://go.dev/cl/655777; this issue is now about strings.Cut.]
Replace:
if strings.HasPrefix(s, pre) { use(strings.TrimPrefix(s, pre)) }
->
if after, ok := strings.CutPrefix(s, pre); ok { use(after) }
Variants:
- bytes package
- CutSuffix
if rest := strings.TrimPrefix(s, pre); rest != s { use(rest) }
-> ...
cc: @josharian
josharian, cuishuang and ccoVeille
Metadata
Metadata
Assignees
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.RefactoringIssues related to refactoring toolsIssues related to refactoring toolsToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.