diff --git a/.golangci.yml b/.golangci.yml index 50ea9635..1df721eb 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -32,7 +32,7 @@ linters: # - prealloc - typecheck # - asciicheck - # - bodyclose + - bodyclose # - dogsled # - dupl # - errcheck @@ -58,14 +58,14 @@ linters: # - gomodguard # - goprintffuncname # - gosec (gas) - # - gosimple (megacheck) + - gosimple # - interfacer # - lll # - maligned # - nestif # - nlreturn # - noctx - # - nolintlint + - nolintlint # - rowserrcheck # - scopelint # - sqlclosecheck diff --git a/cmd/limactl/edit.go b/cmd/limactl/edit.go index d2033daa..5955ad74 100644 --- a/cmd/limactl/edit.go +++ b/cmd/limactl/edit.go @@ -85,7 +85,7 @@ func editAction(cmd *cobra.Command, args []string) error { logrus.Info("Aborting, as requested by saving the file with empty content") return nil } - if bytes.Compare(yBytes, yContent) == 0 { + if bytes.Equal(yBytes, yContent) { logrus.Info("Aborting, no changes made to the instance") return nil } diff --git a/pkg/osutil/osutil_linux.go b/pkg/osutil/osutil_linux.go index 3a51d21e..7e8e2294 100644 --- a/pkg/osutil/osutil_linux.go +++ b/pkg/osutil/osutil_linux.go @@ -11,7 +11,7 @@ const UnixPathMax = 108 // Stat is a selection of syscall.Stat_t type Stat struct { Uid uint32 //nolint:revive - Gid uint32 //nolint:revive + Gid uint32 } func SysStat(fi fs.FileInfo) (Stat, bool) { diff --git a/pkg/osutil/osutil_others.go b/pkg/osutil/osutil_others.go index 9f76ce82..f73a4610 100644 --- a/pkg/osutil/osutil_others.go +++ b/pkg/osutil/osutil_others.go @@ -14,7 +14,7 @@ const UnixPathMax = 104 // Stat is a selection of syscall.Stat_t type Stat struct { Uid uint32 //nolint:revive - Gid uint32 //nolint:revive + Gid uint32 } func SysStat(fi fs.FileInfo) (Stat, bool) { diff --git a/pkg/osutil/osutil_windows.go b/pkg/osutil/osutil_windows.go index 48a109ad..768a2042 100644 --- a/pkg/osutil/osutil_windows.go +++ b/pkg/osutil/osutil_windows.go @@ -14,7 +14,7 @@ const UnixPathMax = 108 // Stat is a selection of syscall.Stat_t type Stat struct { Uid uint32 //nolint:revive - Gid uint32 //nolint:revive + Gid uint32 } func SysStat(_ fs.FileInfo) (Stat, bool) { diff --git a/pkg/osutil/user.go b/pkg/osutil/user.go index 860ea682..9711d749 100644 --- a/pkg/osutil/user.go +++ b/pkg/osutil/user.go @@ -18,13 +18,13 @@ type User struct { User string Uid uint32 //nolint:revive Group string - Gid uint32 //nolint:revive + Gid uint32 Home string } type Group struct { Name string - Gid uint32 //nolint:revive + Gid uint32 } var users map[string]User @@ -77,7 +77,7 @@ func LookupGroup(name string) (Group, error) { const ( fallbackUser = "lima" fallbackUid = 1000 //nolint:revive - fallbackGid = 1000 //nolint:revive + fallbackGid = 1000 ) var cache struct {