Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fb82a7f358 | |||
| 9da2f8711f | |||
| 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) {
|
func (key PrivateKey) MarshalJSON() ([]byte, error) {
|
||||||
return encodeKeyJSON(key.String())
|
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) {
|
func (pub PublicKey) MarshalJSON() ([]byte, error) {
|
||||||
return encodeKeyJSON(pub.String())
|
return encodeKeyJSON(pub.String())
|
||||||
}
|
}
|
||||||
@@ -70,12 +70,12 @@ func encodeKeyJSON(s string) ([]byte, error) {
|
|||||||
return out, nil
|
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) {
|
func (key PrivateKey) MarshalYAML() (any, error) {
|
||||||
return encodeKeyYAML(key.String())
|
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) {
|
func (pub PublicKey) MarshalYAML() (any, error) {
|
||||||
return encodeKeyYAML(pub.String())
|
return encodeKeyYAML(pub.String())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ func pruneWireguardConfig(m MachineIterator, ring int) error {
|
|||||||
var err error
|
var err error
|
||||||
|
|
||||||
m.ForEachMachine(func(p *Machine) bool {
|
m.ForEachMachine(func(p *Machine) bool {
|
||||||
err = p.zone.PruneWireguardConfig(ring)
|
err = p.PruneWireguardConfig(ring)
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
// ignore
|
// ignore
|
||||||
err = nil
|
err = nil
|
||||||
|
|||||||
Reference in New Issue
Block a user