1
0
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:
Carlos Alexandro Becker 2018-12-12 18:24:22 -02:00
parent 2f6cb9d719
commit 7060eb8450
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
4 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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