chore: update function names to be correct and representative of functionality (#2720)
This commit is contained in:
parent
735499f495
commit
3d1ad4c64a
|
|
@ -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")
|
||||
}
|
||||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue