all: update to Go 1.20, use strings.CutPrefix/Suffix instead of our fork
Updates #7123 Updates #5309 Change-Id: I90bcd87a2fb85a91834a0dd4be6e03db08438672 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
623176ebc9
commit
b1248442c3
@ -31,7 +31,6 @@ import (
|
||||
"tailscale.com/metrics"
|
||||
"tailscale.com/net/tsaddr"
|
||||
"tailscale.com/types/logger"
|
||||
"tailscale.com/util/strs"
|
||||
"tailscale.com/util/vizerror"
|
||||
"tailscale.com/version"
|
||||
)
|
||||
@ -753,7 +752,7 @@ func structTypeSortedFields(t reflect.Type) []sortedStructField {
|
||||
// removed.
|
||||
func removeTypePrefixes(s string) string {
|
||||
for _, prefix := range prefixesToTrim {
|
||||
if trimmed, ok := strs.CutPrefix(s, prefix); ok {
|
||||
if trimmed, ok := strings.CutPrefix(s, prefix); ok {
|
||||
return trimmed
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user