Skip to content

Commit

Permalink
fix: lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Mar 19, 2024
1 parent ba8a756 commit 7b3fb8b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion files/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ contents:
`))
err := dec.Decode(&config)
require.NoError(t, err)
errs := make(chan error, 10)
t.Cleanup(func() { close(errs) })
var wg sync.WaitGroup
for i := 0; i < 10; i++ {
wg.Add(1)
Expand All @@ -291,10 +293,14 @@ contents:
false,
mtime,
)
require.NoError(t, err)
errs <- err
}()
}
wg.Wait()

for i := 0; i < 10; i++ {
require.NoError(t, <-errs)
}
}

func TestCollision(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func newDocsCmd() *docsCmd {
Hidden: true,
Args: cobra.NoArgs,
ValidArgsFunction: cobra.NoFileCompletions,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(*cobra.Command, []string) error {
root.cmd.Root().DisableAutoGenTag = true
return doc.GenMarkdownTreeCustom(root.cmd.Root(), "www/docs/cmd", func(_ string) string {
return ""
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/man.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func newManCmd() *manCmd {
Hidden: true,
Args: cobra.NoArgs,
ValidArgsFunction: cobra.NoFileCompletions,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(*cobra.Command, []string) error {
manPage, err := mcobra.NewManPage(1, root.cmd.Root())
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func newPackageCmd() *packageCmd {
SilenceErrors: true,
Args: cobra.NoArgs,
ValidArgsFunction: cobra.NoFileCompletions,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(*cobra.Command, []string) error {
return doPackage(root.config, root.target, root.packager)
},
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func newSchemaCmd() *schemaCmd {
SilenceErrors: true,
Args: cobra.NoArgs,
ValidArgsFunction: cobra.NoFileCompletions,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(*cobra.Command, []string) error {
schema := jsonschema.Reflect(&nfpm.Config{})
schema.Description = "nFPM configuration definition file"
bts, err := json.MarshalIndent(schema, " ", " ")
Expand Down

0 comments on commit 7b3fb8b

Please sign in to comment.