util/deephash: fix unexported time.Time hashing

Updates tailscale/corp#6311

Change-Id: I33cd7e4040966261c2f2eb3d32f29936aeb7f632
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-07-27 09:10:22 -07:00
committed by Brad Fitzpatrick
parent 51c3d74095
commit 04cf46a762
3 changed files with 56 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package testtype contains types for testing deephash.
package testtype
import "time"
type UnexportedAddressableTime struct {
t time.Time
}
func NewUnexportedAddressableTime(t time.Time) *UnexportedAddressableTime {
return &UnexportedAddressableTime{t: t}
}