diff --git a/api/internal/target/kusttarget.go b/api/internal/target/kusttarget.go index cdb419559..5f1d1095a 100644 --- a/api/internal/target/kusttarget.go +++ b/api/internal/target/kusttarget.go @@ -457,7 +457,7 @@ func (kt *KustTarget) accumulateResources( return ra, nil } -// accumulateResources fills the given resourceAccumulator +// accumulateComponents fills the given resourceAccumulator // with resources read from the given list of paths. func (kt *KustTarget) accumulateComponents( ra *accumulator.ResAccumulator, paths []string) (*accumulator.ResAccumulator, error) { diff --git a/cmd/config/internal/commands/run-fns.go b/cmd/config/internal/commands/run-fns.go index ee9446881..bcf987683 100644 --- a/cmd/config/internal/commands/run-fns.go +++ b/cmd/config/internal/commands/run-fns.go @@ -20,7 +20,7 @@ import ( "sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/commands" ) -// GetCatRunner returns a RunFnRunner. +// GetRunFnRunner returns a RunFnRunner. func GetRunFnRunner(name string) *RunFnRunner { r := &RunFnRunner{} c := &cobra.Command{ diff --git a/cmd/config/internal/inpututil/inpututil.go b/cmd/config/internal/inpututil/inpututil.go index 557b35b64..a0f3d0763 100644 --- a/cmd/config/internal/inpututil/inpututil.go +++ b/cmd/config/internal/inpututil/inpututil.go @@ -24,7 +24,7 @@ func MapInputsE(inputs []*yaml.RNode, fn MapInputsEFn) error { type MapInputsFn func(*yaml.RNode, yaml.ResourceMeta) ([]*yaml.RNode, error) -// runs the function against each input Resource, providing the parsed metadata +// runs the function against each input Resource, providing the parsed metadata func MapInputs(inputs []*yaml.RNode, fn MapInputsFn) ([]*yaml.RNode, error) { var outputs []*yaml.RNode for i := range inputs { diff --git a/kustomize/commands/edit/remove/removemetadata.go b/kustomize/commands/edit/remove/removemetadata.go index 3c34916fc..8d04062c5 100644 --- a/kustomize/commands/edit/remove/removemetadata.go +++ b/kustomize/commands/edit/remove/removemetadata.go @@ -40,7 +40,7 @@ type removeMetadataOptions struct { kind kindOfAdd } -// newCmdRemoveLabel removes one or more commonAnnotations from the kustomization file. +// newCmdRemoveAnnotation removes one or more commonAnnotations from the kustomization file. func newCmdRemoveAnnotation(fSys filesys.FileSystem, v func([]string) error) *cobra.Command { var o removeMetadataOptions o.kind = label diff --git a/kyaml/fn/framework/selector.go b/kyaml/fn/framework/selector.go index 4da97e665..20c4a3ffb 100644 --- a/kyaml/fn/framework/selector.go +++ b/kyaml/fn/framework/selector.go @@ -156,7 +156,7 @@ func initMatcherTemplates(matchers []ResourceMatcher, data interface{}) error { var _ ResourceTemplateMatcher = &OrSelector{} -// OrSelector is a kio.Filter that selects resources when that match all of its embedded +// AndSelector is a kio.Filter that selects resources when that match all of its embedded // matchers. type AndSelector struct { // Matchers is the list of ResourceMatchers to try on the input resources. diff --git a/kyaml/fn/runtime/container/container.go b/kyaml/fn/runtime/container/container.go index 76b51a8c5..62aa76f53 100644 --- a/kyaml/fn/runtime/container/container.go +++ b/kyaml/fn/runtime/container/container.go @@ -167,7 +167,7 @@ func (c *Filter) setupExec() error { return nil } -// getArgs returns the command + args to run to spawn the container +// getCommand returns the command + args to run to spawn the container func (c *Filter) getCommand() (string, []string) { network := runtimeutil.NetworkNameNone if c.ContainerSpec.Network { diff --git a/kyaml/kio/ignorefilesmatcher.go b/kyaml/kio/ignorefilesmatcher.go index 0ba3d8382..5ef48d7e3 100644 --- a/kyaml/kio/ignorefilesmatcher.go +++ b/kyaml/kio/ignorefilesmatcher.go @@ -86,7 +86,7 @@ func (i *ignoreFilesMatcher) matchFile(path string) bool { return i.matchers[len(i.matchers)-1].matcher.Match(path, false) } -// matchFile checks whether the directory given by the provided path matches +// matchDir checks whether the directory given by the provided path matches // any of the patterns in the .krmignore file for the package. func (i *ignoreFilesMatcher) matchDir(path string) bool { if len(i.matchers) == 0 { diff --git a/kyaml/openapi/kustomizationapi/swagger.go b/kyaml/openapi/kustomizationapi/swagger.go index 49647be4b..421f70f7c 100644 --- a/kyaml/openapi/kustomizationapi/swagger.go +++ b/kyaml/openapi/kustomizationapi/swagger.go @@ -64,7 +64,7 @@ func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } -// Mode return file modify time +// ModTime return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } diff --git a/kyaml/openapi/openapi.go b/kyaml/openapi/openapi.go index 41ee0afc5..aa1c8d4a8 100644 --- a/kyaml/openapi/openapi.go +++ b/kyaml/openapi/openapi.go @@ -182,7 +182,7 @@ type ResourceSchema struct { Schema *spec.Schema } -// IsEmpty returns true if the ResourceSchema is empty +// IsMissingOrNull returns true if the ResourceSchema is missing or null func (rs *ResourceSchema) IsMissingOrNull() bool { if rs == nil || rs.Schema == nil { return true diff --git a/kyaml/yaml/alias.go b/kyaml/yaml/alias.go index 12c72ae83..5908cd7bd 100644 --- a/kyaml/yaml/alias.go +++ b/kyaml/yaml/alias.go @@ -20,7 +20,7 @@ const ( BareSeqNodeWrappingKey = "bareSeqNodeWrappingKey" ) -// SeqIndentType holds the indentation style for sequence nodes +// SequenceIndentStyle holds the indentation style for sequence nodes type SequenceIndentStyle string // EncoderOptions are options that can be used to configure the encoder,