mirror of
https://github.com/containers/buildah.git
synced 2026-02-05 09:45:38 +01:00
linters: unused arguments shouldn't have names
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
@@ -17,26 +17,26 @@ import (
|
||||
// from a Dockerfile. Try anything more than that and it'll return an error.
|
||||
type configOnlyExecutor struct{}
|
||||
|
||||
func (g *configOnlyExecutor) Preserve(path string) error {
|
||||
func (g *configOnlyExecutor) Preserve(_ string) error {
|
||||
return errors.New("ADD/COPY/RUN not supported as changes")
|
||||
}
|
||||
|
||||
func (g *configOnlyExecutor) EnsureContainerPath(path string) error {
|
||||
func (g *configOnlyExecutor) EnsureContainerPath(_ string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (g *configOnlyExecutor) EnsureContainerPathAs(path, user string, mode *os.FileMode) error {
|
||||
func (g *configOnlyExecutor) EnsureContainerPathAs(_, _ string, _ *os.FileMode) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (g *configOnlyExecutor) Copy(excludes []string, copies ...imagebuilder.Copy) error {
|
||||
func (g *configOnlyExecutor) Copy(_ []string, copies ...imagebuilder.Copy) error {
|
||||
if len(copies) == 0 {
|
||||
return nil
|
||||
}
|
||||
return errors.New("ADD/COPY not supported as changes")
|
||||
}
|
||||
|
||||
func (g *configOnlyExecutor) Run(run imagebuilder.Run, config dockerclient.Config) error {
|
||||
func (g *configOnlyExecutor) Run(_ imagebuilder.Run, _ dockerclient.Config) error {
|
||||
return errors.New("RUN not supported as changes")
|
||||
}
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ func Archive(rootfsPath string, ociConfig *v1.Image, options ArchiveOptions) (io
|
||||
imageSize := slop(options.ImageSize, options.Slop)
|
||||
if imageSize == 0 {
|
||||
var sourceSize int64
|
||||
if err := filepath.WalkDir(rootfsPath, func(path string, d fs.DirEntry, err error) error {
|
||||
if err := filepath.WalkDir(rootfsPath, func(_ string, d fs.DirEntry, err error) error {
|
||||
if err != nil && !errors.Is(err, os.ErrNotExist) && !errors.Is(err, os.ErrPermission) {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ func TestMergeSlicesWithoutDuplicatesFixed(t *testing.T) {
|
||||
map[string]any{"first": 1},
|
||||
},
|
||||
}
|
||||
err := mergeSlicesWithoutDuplicates(base, merge, "array", func(record any) (string, error) {
|
||||
err := mergeSlicesWithoutDuplicates(base, merge, "array", func(_ any) (string, error) {
|
||||
return "fixed", nil
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
@@ -224,7 +224,7 @@ func GetBindMount(ctx *types.SystemContext, args []string, contextDir string, st
|
||||
// GetCacheMount parses a single cache mount entry from the --mount flag.
|
||||
//
|
||||
// If this function succeeds and returns a non-nil *lockfile.LockFile, the caller must unlock it (when??).
|
||||
func GetCacheMount(args []string, store storage.Store, imageMountLabel string, additionalMountPoints map[string]internal.StageMountDetails, workDir string) (specs.Mount, *lockfile.LockFile, error) {
|
||||
func GetCacheMount(args []string, _ storage.Store, _ string, additionalMountPoints map[string]internal.StageMountDetails, workDir string) (specs.Mount, *lockfile.LockFile, error) {
|
||||
var err error
|
||||
var mode uint64
|
||||
var buildahLockFilesDir string
|
||||
|
||||
Reference in New Issue
Block a user