1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-20 03:59:26 +02:00

style: moving Defaulter interface close to where its used

This commit is contained in:
Carlos Alexandro Becker 2018-03-08 18:36:36 -03:00
parent 5830759958
commit c7d3e02ce6
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 12 additions and 18 deletions

View File

@ -1,16 +0,0 @@
package pipeline
import (
"fmt"
"github.com/goreleaser/goreleaser/context"
)
// Defaulter can be implemented by a Piper to set default values for its
// configuration.
type Defaulter interface {
fmt.Stringer
// Default sets the configuration defaults
Default(ctx *context.Context) error
}

View File

@ -3,9 +3,10 @@
package defaults
import (
"fmt"
"github.com/apex/log"
"github.com/goreleaser/goreleaser/context"
"github.com/goreleaser/goreleaser/pipeline"
"github.com/goreleaser/goreleaser/pipeline/archive"
"github.com/goreleaser/goreleaser/pipeline/artifactory"
"github.com/goreleaser/goreleaser/pipeline/brew"
@ -29,7 +30,16 @@ func (Pipe) String() string {
return "setting defaults for:"
}
var defaulters = []pipeline.Defaulter{
// Defaulter can be implemented by a Piper to set default values for its
// configuration.
type Defaulter interface {
fmt.Stringer
// Default sets the configuration defaults
Default(ctx *context.Context) error
}
var defaulters = []Defaulter{
env.Pipe{},
snapshot.Pipe{},
release.Pipe{},