Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update function names to be correct and representative of functionality #2720

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading