1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-05-06 00:26:11 +02:00

fix: lint issues

This commit is contained in:
Carlos Alexandro Becker 2024-03-19 10:14:49 -03:00
parent ba8a7568e0
commit 7b3fb8b759
No known key found for this signature in database
5 changed files with 11 additions and 5 deletions

View File

@ -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)
@ -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) {

View File

@ -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 ""

View File

@ -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

View File

@ -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)
},
}

View File

@ -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, " ", " ")