1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-15 01:34:21 +02:00

Fixing some linter errors

This commit is contained in:
Jorin Vogel
2017-01-14 19:41:32 +01:00
parent 432f12967b
commit a2bf57f8e1
8 changed files with 14 additions and 12 deletions

View File

@ -40,7 +40,7 @@ type templateData struct {
// Pipe for brew deployment // Pipe for brew deployment
type Pipe struct{} type Pipe struct{}
// Name of the pipe // Description of the pipe
func (Pipe) Description() string { func (Pipe) Description() string {
return "Creating homebrew formulae..." return "Creating homebrew formulae..."
} }

View File

@ -14,7 +14,7 @@ import (
// Pipe for build // Pipe for build
type Pipe struct{} type Pipe struct{}
// Name of the pipe // Description of the pipe
func (Pipe) Description() string { func (Pipe) Description() string {
return "Building..." return "Building..."
} }

View File

@ -15,7 +15,7 @@ import (
// Pipe for compress // Pipe for compress
type Pipe struct{} type Pipe struct{}
// Name of the pipe // Description of the pipe
func (Pipe) Description() string { func (Pipe) Description() string {
return "Creating archives..." return "Creating archives..."
} }
@ -32,6 +32,7 @@ func (Pipe) Run(ctx *context.Context) error {
return g.Wait() return g.Wait()
} }
// Archive represents a compression archive files from disk can be written to.
type Archive interface { type Archive interface {
Close() error Close() error
Add(name, path string) error Add(name, path string) error

View File

@ -13,13 +13,13 @@ var defaultFiles = []string{"licence", "license", "readme", "changelog"}
// Pipe for brew deployment // Pipe for brew deployment
type Pipe struct{} type Pipe struct{}
// Name of the pipe // Description of the pipe
func (Pipe) Description() string { func (Pipe) Description() string {
return "Setting defaults..." return "Setting defaults..."
} }
// Run the pipe // Run the pipe
func (Pipe) Run(ctx *context.Context) (err error) { func (Pipe) Run(ctx *context.Context) error {
if ctx.Config.Repo == "" { if ctx.Config.Repo == "" {
repo, err := remoteRepo() repo, err := remoteRepo()
ctx.Config.Repo = repo ctx.Config.Repo = repo
@ -61,14 +61,14 @@ func (Pipe) Run(ctx *context.Context) (err error) {
} }
} }
if len(ctx.Config.Files) != 0 { if len(ctx.Config.Files) != 0 {
return return nil
} }
files, err := findFiles() files, err := findFiles()
if err != nil { if err != nil {
return return err
} }
ctx.Config.Files = files ctx.Config.Files = files
return return nil
} }
func findFiles() (files []string, err error) { func findFiles() (files []string, err error) {

3
pipeline/env/env.go vendored
View File

@ -7,12 +7,13 @@ import (
"github.com/goreleaser/releaser/context" "github.com/goreleaser/releaser/context"
) )
// ErrMissingToken indicates an error when GITHUB_TOKEN is missing in the environment
var ErrMissingToken = errors.New("Missing GITHUB_TOKEN") var ErrMissingToken = errors.New("Missing GITHUB_TOKEN")
// Pipe for env // Pipe for env
type Pipe struct{} type Pipe struct{}
// Name of the pipe // Description of the pipe
func (Pipe) Description() string { func (Pipe) Description() string {
return "Loading data from environment variables..." return "Loading data from environment variables..."
} }

View File

@ -5,7 +5,7 @@ import "github.com/goreleaser/releaser/context"
// Pipe for brew deployment // Pipe for brew deployment
type Pipe struct{} type Pipe struct{}
// Name of the pipe // Description of the pipe
func (Pipe) Description() string { func (Pipe) Description() string {
return "Gathering Git data..." return "Gathering Git data..."
} }

View File

@ -14,7 +14,7 @@ import (
// Pipe for github release // Pipe for github release
type Pipe struct{} type Pipe struct{}
// Name of the pipe // Description of the pipe
func (Pipe) Description() string { func (Pipe) Description() string {
return "Releasing to GitHub..." return "Releasing to GitHub..."
} }

View File

@ -9,7 +9,7 @@ import (
// Pipe for brew deployment // Pipe for brew deployment
type Pipe struct{} type Pipe struct{}
// Name of the pipe // Description of the pipe
func (Pipe) Description() string { func (Pipe) Description() string {
return "Filling repositories data..." return "Filling repositories data..."
} }