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
@@ -9,7 +9,6 @@ import (
|
||||
"testing"
|
||||
|
||||
"tailscale.com/types/lazy"
|
||||
"tailscale.com/types/ptr"
|
||||
"tailscale.com/util/syspolicy/internal"
|
||||
"tailscale.com/util/syspolicy/pkey"
|
||||
)
|
||||
@@ -138,7 +137,7 @@ func TestSettingDefinition(t *testing.T) {
|
||||
if !tt.setting.Equal(tt.setting) {
|
||||
t.Errorf("the setting should be equal to itself")
|
||||
}
|
||||
if tt.setting != nil && !tt.setting.Equal(ptr.To(*tt.setting)) {
|
||||
if tt.setting != nil && !tt.setting.Equal(new(*tt.setting)) {
|
||||
t.Errorf("the setting should be equal to its shallow copy")
|
||||
}
|
||||
if gotKey := tt.setting.Key(); gotKey != tt.wantKey {
|
||||
|
||||
Reference in New Issue
Block a user