Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a14205e7e |
@@ -51,12 +51,12 @@ func (pub PublicKey) String() string {
|
||||
}
|
||||
}
|
||||
|
||||
// MarshalJSON encodes the key for JSON, omiting empty.
|
||||
// MarshalJSON encodes the key for JSON, omitting empty.
|
||||
func (key PrivateKey) MarshalJSON() ([]byte, error) {
|
||||
return encodeKeyJSON(key.String())
|
||||
}
|
||||
|
||||
// MarshalJSON encodes the key for JSON, omiting empty.
|
||||
// MarshalJSON encodes the key for JSON, omitting empty.
|
||||
func (pub PublicKey) MarshalJSON() ([]byte, error) {
|
||||
return encodeKeyJSON(pub.String())
|
||||
}
|
||||
@@ -70,12 +70,12 @@ func encodeKeyJSON(s string) ([]byte, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MarshalYAML encodes the key for YAML, omiting empty.
|
||||
// MarshalYAML encodes the key for YAML, omitting empty.
|
||||
func (key PrivateKey) MarshalYAML() (any, error) {
|
||||
return encodeKeyYAML(key.String())
|
||||
}
|
||||
|
||||
// MarshalYAML encodes the key for YAML, omiting empty.
|
||||
// MarshalYAML encodes the key for YAML, omitting empty.
|
||||
func (pub PublicKey) MarshalYAML() (any, error) {
|
||||
return encodeKeyYAML(pub.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user