builder/copy-unix: fix filepath.Walk args

Mark unused WalkFunc arguments as such, to get rid of the
following linterwarning:

> builder/dockerfile/copy_unix.go:28:71: SA4009: argument err is overwritten before first use (staticcheck)
> 	return filepath.Walk(source, func(fullpath string, info os.FileInfo, err error) error {

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2019-08-05 16:25:25 -07:00 committed by Sebastiaan van Stijn
parent b5695b8663
commit d8ec1ee57d
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ func fixPermissions(source, destination string, identity idtools.Identity, overr
// We Walk on the source rather than on the destination because we don't
// want to change permissions on things we haven't created or modified.
return filepath.Walk(source, func(fullpath string, info os.FileInfo, err error) error {
return filepath.Walk(source, func(fullpath string, _ os.FileInfo, _ error) error {
// Do not alter the walk root iff. it existed before, as it doesn't fall under
// the domain of "things we should chown".
if skipChownRoot && source == fullpath {