mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-22 02:50:42 +00:00
tailcfg: add marshaling round-tripping test.
Temporary until #3206 goes away, but having changed the marshal/unmarshal implementation I got nervous about the new one doing the correct thing. Thankfully, the test says it does. Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
@@ -1160,6 +1160,9 @@ func (k *NodeKey) UnmarshalText(text []byte) error {
|
||||
nk.AppendTo(k[:0])
|
||||
return nil
|
||||
}
|
||||
func (k NodeKey) AsNodePublic() key.NodePublic {
|
||||
return key.NodePublicFromRaw32(mem.B(k[:]))
|
||||
}
|
||||
|
||||
// IsZero reports whether k is the zero value.
|
||||
func (k NodeKey) IsZero() bool { return k == NodeKey{} }
|
||||
|
Reference in New Issue
Block a user