]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - remote/ainsl/ainsl.go
Update copyright years
[safcm/safcm.git] / remote / ainsl / ainsl.go
index 2a64d63439871954379b26630dabc763c1a73f44..292545237ff1905b207dad7d23f208c86c67d3af 100644 (file)
@@ -4,7 +4,7 @@
 //
 // FAI: https://fai-project.org
 
-// Copyright (C) 2021  Simon Ruderich
+// Copyright (C) 2021-2022  Simon Ruderich
 //
 // This program is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -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)