mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-21 10:27:30 +00:00
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
@@ -7,11 +7,11 @@ import (
|
||||
"fmt"
|
||||
"net/netip"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"go4.org/mem"
|
||||
"tailscale.com/types/key"
|
||||
"tailscale.com/util/strs"
|
||||
)
|
||||
|
||||
func TestMarshalAndParse(t *testing.T) {
|
||||
@@ -71,7 +71,7 @@ func TestMarshalAndParse(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
foo := []byte("foo")
|
||||
got := string(tt.m.AppendMarshal(foo))
|
||||
got, ok := strs.CutPrefix(got, "foo")
|
||||
got, ok := strings.CutPrefix(got, "foo")
|
||||
if !ok {
|
||||
t.Fatalf("didn't start with foo: got %q", got)
|
||||
}
|
||||
|
Reference in New Issue
Block a user