chore: update darvaza.org/core to v0.10.0

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-10-23 20:50:41 +00:00
parent 76b40e63c7
commit 99ae34e98c
6 changed files with 26 additions and 26 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ var sectionMap = map[string]func(*Config, *basic.Section) error{
func loadConfSection(out *Config, src *basic.Section) error {
h, ok := sectionMap[src.Key]
if !ok {
return core.Wrapf(fs.ErrInvalid, "unknown section %q", src.Key)
return core.Wrap(fs.ErrInvalid, "unknown section %q", src.Key)
}
return h(out, src)
@@ -48,7 +48,7 @@ func loadGlobalConfField(cfg *GlobalConfig, field basic.Field) error {
switch field.Key {
case "fsid":
if !core.IsZero(cfg.FSID) {
return core.Wrapf(fs.ErrInvalid, "duplicate field %q", field.Key)
return core.Wrap(fs.ErrInvalid, "duplicate field %q", field.Key)
}
err := cfg.FSID.UnmarshalText([]byte(field.Value))
+3 -3
View File
@@ -28,7 +28,7 @@ func (m *Machine) GetWireguardKeys(ring int) (wireguard.KeyPair, error) {
out.PrivateKey, err = wireguard.PrivateKeyFromBase64(string(data))
if err != nil {
// bad key
err = core.Wrapf(err, "wg%v.key", ring)
err = core.Wrap(err, "wg%v.key", ring)
return out, err
}
@@ -44,7 +44,7 @@ func (m *Machine) GetWireguardKeys(ring int) (wireguard.KeyPair, error) {
out.PublicKey, err = wireguard.PublicKeyFromBase64(string(data))
if err != nil {
// bad key
err = core.Wrapf(err, "wg%v.pub", ring)
err = core.Wrap(err, "wg%v.pub", ring)
return out, err
}
}
@@ -126,7 +126,7 @@ func (m *Machine) applyWireguardConfig(ring int, wg *wireguard.Config) error {
}
if err := m.applyZoneNodeID(zoneID, nodeID); err != nil {
return core.Wrapf(err, "%s: invalid address", addr)
return core.Wrap(err, "%s: invalid address", addr)
}
if err := m.applyWireguardInterfaceConfig(ring, wg.Interface); err != nil {
+1 -1
View File
@@ -151,7 +151,7 @@ func (v *intermediateConfig) Export() (*Config, error) {
for i := 0; i < peers; i++ {
p, err := v.ExportPeer(i)
if err != nil {
err = core.Wrapf(err, "Peer[%v]:", i)
err = core.Wrap(err, "Peer[%v]:", i)
return nil, err
}