MCPcopy Create free account
hub / github.com/git-bug/git-bug / Clone

Method Clone

entities/identity/key.go:78–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76}
77
78func (k *Key) Clone() *Key {
79 clone := &Key{}
80
81 pub := *k.public
82 clone.public = &pub
83
84 if k.private != nil {
85 priv := *k.private
86 clone.private = &priv
87 }
88
89 return clone
90}
91
92func (k *Key) MarshalJSON() ([]byte, error) {
93 // Serialize only the public key, in the armored format.

Callers 2

MutateMethod · 0.45
SetMetadataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected