diff --git a/cmds/cpuns/main_unix.go b/cmds/cpuns/main_unix.go index 7027e5a..eda42e3 100644 --- a/cmds/cpuns/main_unix.go +++ b/cmds/cpuns/main_unix.go @@ -55,7 +55,7 @@ func checkprivate() error { return err } if len(mnts) != 1 { - return fmt.Errorf("got more than 1 mount for /(%v):%v", mnts, os.ErrInvalid) + return fmt.Errorf("got more than 1 mount for /(%v):%w", mnts, os.ErrInvalid) } entry := mnts[0] isShared := strings.Contains(entry.Optional, "shared:1") diff --git a/mount/mount_freebsd.go b/mount/mount_freebsd.go index 26adbb2..297eecb 100644 --- a/mount/mount_freebsd.go +++ b/mount/mount_freebsd.go @@ -119,7 +119,7 @@ func mount(m mounter, fstab string) error { // we do no further manipulation of opts. flags, data := parse(opts) if e := m(dev, where, fstype, flags, data); e != nil { - err = errors.Join(err, fmt.Errorf("Mount(%q, %q, %q, %q=>(%#x, %q)): %v", dev, where, fstype, opts, flags, data, e)) + err = errors.Join(err, fmt.Errorf("Mount(%q, %q, %q, %q=>(%#x, %q)): %w", dev, where, fstype, opts, flags, data, e)) } } return err diff --git a/mount/mount_linux.go b/mount/mount_linux.go index 3a77d80..f8b0237 100644 --- a/mount/mount_linux.go +++ b/mount/mount_linux.go @@ -109,7 +109,7 @@ func mount(m mounter, fstab string) error { // we do no further manipulation of opts. flags, data := parse(opts) if e := m(dev, where, fstype, flags, data); e != nil { - err = errors.Join(err, fmt.Errorf("Mount(%q, %q, %q, %q=>(%#x, %q)): %v", dev, where, fstype, opts, flags, data, e)) + err = errors.Join(err, fmt.Errorf("Mount(%q, %q, %q, %q=>(%#x, %q)): %w", dev, where, fstype, opts, flags, data, e)) } } return err