Skip to content

Commit

Permalink
Fix lint stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Aug 10, 2020
1 parent 971195d commit 7681c9b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions pipedream.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,17 @@ import (
)

const (
Kilobyte int64 = 1024
Megabyte int64 = Kilobyte * 1024
DefaultRegion = "us-east-1"
// Kilobyte is a convenience measurement useful when setting upload part
// sizes.
Kilobyte int64 = 1024

// Megabyte is a convenience measurement useful when setting upload part
// sizes.
Megabyte int64 = Kilobyte * 1024

// DefaultRegion is the region to use as a default. This should be used for
// services that don't use regions, like DigitalOcean spaces.
DefaultRegion = "us-east-1"
)

// Event represents activity that occurred during the upload. Events are sent
Expand Down Expand Up @@ -130,10 +138,10 @@ func (e Error) Error() string {

// Implement dummy methods to satisfy Event interface. We're doing this for
// type safety.
func (x Progress) event() {}
func (x Retry) event() {}
func (x Complete) event() {}
func (x Error) event() {}
func (p Progress) event() {}
func (r Retry) event() {}
func (c Complete) event() {}
func (e Error) event() {}

// MultipartUpload handles multipart uploads to S3 and S3-compatible systems.
type MultipartUpload struct {
Expand Down
2 changes: 1 addition & 1 deletion pipedream/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func run(cmd *cobra.Command, args []string) error {
missing = append(missing, "path")
}
if len(missing) > 0 {
return errors.New(fmt.Sprintf("missing %s", pipedream.EnglishJoin(missing, true)))
return fmt.Errorf("missing %s", pipedream.EnglishJoin(missing, true))
}
log.Println(endpoint)
log.Println(region)
Expand Down

0 comments on commit 7681c9b

Please sign in to comment.