Skip to content

Commit d25b27a

Browse files
authored
Merge pull request #2884 from jakobmoellersap/fix-lint
🌱 fix `fmt` lint issues on `master`
2 parents b7e8c36 + f0c8fa6 commit d25b27a

File tree

2 files changed

+9
-7
lines changed
  • pkg
    • cli/alpha/config-gen
    • plugins/golang/deploy-image/v1alpha1/scaffolds

2 files changed

+9
-7
lines changed

pkg/cli/alpha/config-gen/cmd.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ limitations under the License.
1717
package configgen
1818

1919
import (
20-
// required to make sure the controller-tools is initialized fully
21-
_ "sigs.k8s.io/controller-runtime/pkg/scheme"
22-
2320
"embed"
2421
"fmt"
2522
"io/ioutil"
@@ -28,6 +25,9 @@ import (
2825
"path/filepath"
2926
"strings"
3027

28+
// required to make sure the controller-tools is initialized fully
29+
_ "sigs.k8s.io/controller-runtime/pkg/scheme"
30+
3131
"github.com/spf13/cobra"
3232
"sigs.k8s.io/kustomize/kyaml/fn/framework"
3333
"sigs.k8s.io/kustomize/kyaml/fn/framework/command"
@@ -37,6 +37,7 @@ import (
3737
)
3838

3939
// TemplateFS contains the templates used by config-gen
40+
//
4041
//go:embed templates/resources/* templates/patches/*
4142
var TemplateFS embed.FS
4243

@@ -310,12 +311,12 @@ kubebuilder alpha config-gen install-as-plugin
310311
fmt.Fprintf(cmd.OutOrStdout(), "writing kustomize plugin file at %s\n", fullScriptPath)
311312

312313
dir, _ := filepath.Split(fullScriptPath)
313-
if err = os.MkdirAll(dir, 0700); err != nil {
314+
if err = os.MkdirAll(dir, 0o700); err != nil {
314315
return err
315316
}
316317

317318
// r-x perms to prevent overwrite vulnerability since the script will be executed out-of-tree.
318-
return ioutil.WriteFile(fullScriptPath, []byte(pluginScript), 0500)
319+
return ioutil.WriteFile(fullScriptPath, []byte(pluginScript), 0o500)
319320
},
320321
}
321322
c.AddCommand(install)

pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/api.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ type apiScaffolder struct {
5252
}
5353

5454
// NewAPIScaffolder returns a new Scaffolder for declarative
55-
//nolint: lll
55+
// nolint: lll
5656
func NewDeployImageScaffolder(config config.Config, res resource.Resource, image,
57-
command, port, runAsUser string) plugins.Scaffolder {
57+
command, port, runAsUser string,
58+
) plugins.Scaffolder {
5859
return &apiScaffolder{
5960
config: config,
6061
resource: res,

0 commit comments

Comments
 (0)