mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-06 03:13:48 +02:00
chore: small code improvements
This commit is contained in:
parent
2f6cb9d719
commit
7060eb8450
2
internal/pipe/dist/dist.go
vendored
2
internal/pipe/dist/dist.go
vendored
@ -37,7 +37,7 @@ func (Pipe) Run(ctx *context.Context) (err error) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if len(files) > 0 {
|
||||
if len(files) != 0 {
|
||||
log.Debugf("there are %d files on ./dist", len(files))
|
||||
return fmt.Errorf(
|
||||
"%s is not empty, remove it before running goreleaser or use the --rm-dist flag",
|
||||
|
@ -39,7 +39,7 @@ func (Pipe) Default(ctx *context.Context) error {
|
||||
fpm.NameTemplate = defaultNameTemplate
|
||||
}
|
||||
if fpm.Files == nil {
|
||||
fpm.Files = make(map[string]string)
|
||||
fpm.Files = map[string]string{}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ func buildManifest(ctx *context.Context, artifacts []artifact.Artifact) (bytes.B
|
||||
var result bytes.Buffer
|
||||
var manifest = Manifest{
|
||||
Version: ctx.Version,
|
||||
Architecture: make(map[string]Resource),
|
||||
Architecture: map[string]Resource{},
|
||||
Homepage: ctx.Config.Scoop.Homepage,
|
||||
License: ctx.Config.Scoop.License,
|
||||
Description: ctx.Config.Scoop.Description,
|
||||
|
@ -142,7 +142,7 @@ func create(ctx *context.Context, arch string, binaries []artifact.Artifact) err
|
||||
Grade: ctx.Config.Snapcraft.Grade,
|
||||
Confinement: ctx.Config.Snapcraft.Confinement,
|
||||
Architectures: []string{arch},
|
||||
Apps: make(map[string]AppMetadata),
|
||||
Apps: map[string]AppMetadata{},
|
||||
}
|
||||
|
||||
metadata.Name = ctx.Config.ProjectName
|
||||
|
Loading…
Reference in New Issue
Block a user