[go] net: use stringslite package for string operations

2 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
May 17, 2024, 11:13:35 PMMay 17
to Gerrit Bot, Zhen Li, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Ian Lance Taylor, Dmitri Shuralyov, Dmitri Shuralyov, Damien Neil, Go LUCI, qiu laidongfeng2, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
net: use stringslite package for string operations

- Replace manual string suffix removal with stringslite.TrimSuffix in conf.go
- Use stringslite.Cut for string splitting in ParseCIDR function in ip.go
- Add stringslite import in ip.go

This change simplifies string operations and improves code readability.
Change-Id: I02c238d0bc91e95789d8060e6ef4c7d4f6e3f0d9
GitHub-Last-Rev: aef5dc5011217abc95b2a2d7c1d991ca84060d59
GitHub-Pull-Request: golang/go#67461
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Auto-Submit: Ian Lance Taylor <ia...@golang.org>
Commit-Queue: Ian Lance Taylor <ia...@golang.org>
Reviewed-by: Damien Neil <dn...@google.com>
Files:
  • M src/net/conf.go
  • M src/net/ip.go
Change size: S
Delta: 2 files changed, 4 insertions(+), 6 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Damien Neil, +1 by Dmitri Shuralyov
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I02c238d0bc91e95789d8060e6ef4c7d4f6e3f0d9
Gerrit-Change-Number: 586157
Gerrit-PatchSet: 2
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: qiu laidongfeng2 <26454...@qq.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-CC: Zhen Li <mr....@gmail.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages