]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - remote/ainsl/ainsl.go
ci/run: run golangci-lint
[safcm/safcm.git] / remote / ainsl / ainsl.go
index 2a64d63439871954379b26630dabc763c1a73f44..8a65d4d98f54667d85c3043658be0346bad9706d 100644 (file)
@@ -47,7 +47,7 @@ func Main(args []string) error {
        optionCreate := flag.Bool("create", false,
                "create the path if it does not exist")
 
-       flag.CommandLine.Parse(args[2:])
+       flag.CommandLine.Parse(args[2:]) //nolint:errcheck
 
        if flag.NArg() != 2 {
                flag.Usage()
@@ -119,7 +119,7 @@ func handle(path string, line string, create bool) ([]string, error) {
                gid = int(x.Gid)
                mode = stat.Mode()
        }
-       stat = nil // prevent accidental use
+       stat = nil //nolint:wastedassign // prevent accidental use
 
        // Check if the expected line is present
        var found bool
@@ -161,7 +161,7 @@ func handle(path string, line string, create bool) ([]string, error) {
        }
        err = unix.Renameat(parentFd, tmpBase, parentFd, baseName)
        if err != nil {
-               unix.Unlinkat(parentFd, tmpBase, 0)
+               unix.Unlinkat(parentFd, tmpBase, 0) //nolint:errcheck
                return nil, err
        }
        err = unix.Fsync(parentFd)