chore: update darvaza.org/core to v0.10.0
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user