1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-09-16 09:26:52 +02:00

refactor: Simplified if checks for configured artifactories

-       if l := len(ctx.Config.Artifactories); l == 0 {
+       if len(ctx.Config.Artifactories) == 0 {
This commit is contained in:
Andy Grunwald
2017-12-10 14:23:32 +01:00
parent 240a70e17c
commit 4e4529bbf8

View File

@@ -62,7 +62,7 @@ func (Pipe) String() string {
// Default sets the pipe defaults
func (Pipe) Default(ctx *context.Context) error {
if l := len(ctx.Config.Artifactories); l == 0 {
if len(ctx.Config.Artifactories) == 0 {
return nil
}
@@ -80,7 +80,7 @@ func (Pipe) Default(ctx *context.Context) error {
//
// Docs: https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-Example-DeployinganArtifact
func (Pipe) Run(ctx *context.Context) error {
if l := len(ctx.Config.Artifactories); l == 0 {
if len(ctx.Config.Artifactories) == 0 {
return pipeline.Skip("artifactory section is not configured")
}