Files
moby/volume
Sebastiaan van Stijn f9c4601760 volume/mounts: MountPoint.Setup: rename output-var, and simplify err-handling
Rename the ouput variable to prevent accidental shadowing, and simplify how
we check for the `syscall.ENOTDIR` error; `errors.Is()` will already unwrap
the error, so no type-casting is needed;

    package main

    import (
        "errors"
        "fmt"
        "os"
        "syscall"
    )

    func main() {
        err := &os.PathError{Op: "mkdir", Path: "/hello/world", Err: syscall.ENOTDIR}
        if errors.Is(err, syscall.ENOTDIR) {
            fmt.Println(err)
        }
    }

While at it, also improve the code-comment that outlines the intent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-08 14:33:11 +02:00
..
2025-04-26 16:07:56 +02:00
2025-05-08 14:33:11 +02:00