Merge pull request #1893 from artmello/enable_linters

kyaml: Enable Go linters (lll, stylecheck, unparam, whitespace)
This commit is contained in:
Kubernetes Prow Robot
2019-12-06 08:32:50 -08:00
committed by GitHub
26 changed files with 38 additions and 58 deletions

View File

@@ -126,7 +126,7 @@ func (r *CatRunner) runE(c *cobra.Command, args []string) error {
Writer: out,
KeepReaderAnnotations: r.KeepAnnotations,
WrappingKind: r.WrapKind,
WrappingApiVersion: r.WrapApiVersion,
WrappingAPIVersion: r.WrapApiVersion,
FunctionConfig: functionConfig,
Style: yaml.GetStyle(r.Styles...),
})

View File

@@ -134,7 +134,7 @@ func (r *WrapRunner) runE(c *cobra.Command, args []string) error {
KeepReaderAnnotations: true,
Writer: c.OutOrStdout(),
WrappingKind: kio.ResourceListKind,
WrappingApiVersion: kio.ResourceListApiVersion}}}.Execute()
WrappingAPIVersion: kio.ResourceListAPIVersion}}}.Execute()
if err != nil {
return err
}

View File

@@ -186,7 +186,7 @@ func (r *XArgsRunner) runE(c *cobra.Command, _ []string) error {
if version := rw.FunctionConfig.Field("apiVersion"); !yaml.IsFieldEmpty(version) {
version.Value.YNode().Value = r.WrapVersion
}
rw.WrappingApiVersion = r.WrapVersion
rw.WrappingAPIVersion = r.WrapVersion
}
return nil
}(); err != nil {