summaryrefslogtreecommitdiffhomepage
path: root/tka/tka_clone.go
blob: 323a824fe5a630cd007c232d02b2be018720b41b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

// Code generated by tailscale.com/cmd/cloner; DO NOT EDIT.

package tka

// Clone makes a deep copy of NodeKeySignature.
// The result aliases no memory with the original.
func (src *NodeKeySignature) Clone() *NodeKeySignature {
	if src == nil {
		return nil
	}
	dst := new(NodeKeySignature)
	*dst = *src
	dst.Pubkey = append(src.Pubkey[:0:0], src.Pubkey...)
	dst.KeyID = append(src.KeyID[:0:0], src.KeyID...)
	dst.Signature = append(src.Signature[:0:0], src.Signature...)
	dst.Nested = src.Nested.Clone()
	dst.WrappingPubkey = append(src.WrappingPubkey[:0:0], src.WrappingPubkey...)
	return dst
}

// A compilation failure here means this code must be regenerated, with the command at the top of this file.
var _NodeKeySignatureCloneNeedsRegeneration = NodeKeySignature(struct {
	SigKind        SigKind
	Pubkey         []byte
	KeyID          []byte
	Signature      []byte
	Nested         *NodeKeySignature
	WrappingPubkey []byte
}{})