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
@@ -19,7 +19,6 @@ import (
|
||||
jsonv2 "github.com/go-json-experiment/json"
|
||||
"github.com/go-json-experiment/json/jsontext"
|
||||
"go4.org/mem"
|
||||
"tailscale.com/types/ptr"
|
||||
)
|
||||
|
||||
// ByteSlice is a read-only accessor for types that are backed by a []byte.
|
||||
@@ -901,7 +900,7 @@ func (p ValuePointer[T]) Clone() *T {
|
||||
if p.ж == nil {
|
||||
return nil
|
||||
}
|
||||
return ptr.To(*p.ж)
|
||||
return new(*p.ж)
|
||||
}
|
||||
|
||||
// String implements [fmt.Stringer].
|
||||
|
||||
Reference in New Issue
Block a user