Skip to content

Commit

Permalink
chore: update function names to be correct and representative of func…
Browse files Browse the repository at this point in the history
…tionality (#2720)
  • Loading branch information
aaron-prindle authored Sep 20, 2023
1 parent 735499f commit 3d1ad4c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/dockerfile/dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func ParseStages(opts *config.KanikoOptions) ([]instructions.Stage, []instructio
return nil, nil, errors.Wrap(err, "parsing dockerfile")
}

metaArgs, err = expandNested(metaArgs, opts.BuildArgs)
metaArgs, err = expandNestedArgs(metaArgs, opts.BuildArgs)
if err != nil {
return nil, nil, errors.Wrap(err, "expanding meta ARGs")
}
Expand Down Expand Up @@ -102,8 +102,8 @@ func Parse(b []byte) ([]instructions.Stage, []instructions.ArgCommand, error) {
return stages, metaArgs, nil
}

// expandNested tries to resolve nested ARG value against the previously defined ARGs
func expandNested(metaArgs []instructions.ArgCommand, buildArgs []string) ([]instructions.ArgCommand, error) {
// expandNestedArgs tries to resolve nested ARG value against the previously defined ARGs
func expandNestedArgs(metaArgs []instructions.ArgCommand, buildArgs []string) ([]instructions.ArgCommand, error) {
var prevArgs []string
for i, marg := range metaArgs {
for j, arg := range marg.Args {
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/fs_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func ExtractFile(dest string, hdr *tar.Header, cleanedName string, tr io.Reader)
return err
}

if err = writeSecurityXattrToToFile(path, hdr); err != nil {
if err = writeSecurityXattrToTarFile(path, hdr); err != nil {
return err
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/util/tar_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ const (
securityCapabilityXattr = "security.capability"
)

// writeSecurityXattrToToFile writes security.capability
// writeSecurityXattrToTarFile writes security.capability
// xattrs from a tar header to filesystem
func writeSecurityXattrToToFile(path string, hdr *tar.Header) error {
func writeSecurityXattrToTarFile(path string, hdr *tar.Header) error {
if hdr.Xattrs == nil {
return nil
}
Expand Down

0 comments on commit 3d1ad4c

Please sign in to comment.