types/ptr: deprecate ptr.To, use Go 1.26 new
Updates #18682 Change-Id: I62f6aa0de2a15ef8c1435032c6aa74a181c25f8f Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
8cfbaa717d
commit
2a64c03c95
@@ -10,7 +10,6 @@ import (
|
||||
"github.com/go-json-experiment/json"
|
||||
"github.com/go-json-experiment/json/jsontext"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"tailscale.com/types/ptr"
|
||||
)
|
||||
|
||||
type Interface interface {
|
||||
@@ -72,7 +71,7 @@ func TestInterfaceCoders(t *testing.T) {
|
||||
wantJSON: `{"Foo":"hello"}`,
|
||||
}, {
|
||||
label: "BarPointer",
|
||||
wantVal: InterfaceWrapper{ptr.To(Bar(5))},
|
||||
wantVal: InterfaceWrapper{new(Bar(5))},
|
||||
wantJSON: `{"Bar":5}`,
|
||||
}, {
|
||||
label: "BarValue",
|
||||
|
||||
Reference in New Issue
Block a user