X-Git-Url: https://ruderich.org/simon/gitweb/?p=safcm%2Fsafcm.git;a=blobdiff_plain;f=remote%2Fainsl%2Fainsl.go;fp=remote%2Fainsl%2Fainsl.go;h=8a65d4d98f54667d85c3043658be0346bad9706d;hp=2a64d63439871954379b26630dabc763c1a73f44;hb=ba1a93368ed95d7160062f60fb8b579bc178d3aa;hpb=8620dac1f9ee7f73058e3e97b488ec0c710a89df diff --git a/remote/ainsl/ainsl.go b/remote/ainsl/ainsl.go index 2a64d63..8a65d4d 100644 --- a/remote/ainsl/ainsl.go +++ b/remote/ainsl/ainsl.go @@ -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)