Skip to content

Commit 7681c9b

Browse files
committed
Fix lint stuff
1 parent 971195d commit 7681c9b

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

pipedream.go

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,17 @@ import (
7878
)
7979

8080
const (
81-
Kilobyte int64 = 1024
82-
Megabyte int64 = Kilobyte * 1024
83-
DefaultRegion = "us-east-1"
81+
// Kilobyte is a convenience measurement useful when setting upload part
82+
// sizes.
83+
Kilobyte int64 = 1024
84+
85+
// Megabyte is a convenience measurement useful when setting upload part
86+
// sizes.
87+
Megabyte int64 = Kilobyte * 1024
88+
89+
// DefaultRegion is the region to use as a default. This should be used for
90+
// services that don't use regions, like DigitalOcean spaces.
91+
DefaultRegion = "us-east-1"
8492
)
8593

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

131139
// Implement dummy methods to satisfy Event interface. We're doing this for
132140
// type safety.
133-
func (x Progress) event() {}
134-
func (x Retry) event() {}
135-
func (x Complete) event() {}
136-
func (x Error) event() {}
141+
func (p Progress) event() {}
142+
func (r Retry) event() {}
143+
func (c Complete) event() {}
144+
func (e Error) event() {}
137145

138146
// MultipartUpload handles multipart uploads to S3 and S3-compatible systems.
139147
type MultipartUpload struct {

pipedream/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func run(cmd *cobra.Command, args []string) error {
111111
missing = append(missing, "path")
112112
}
113113
if len(missing) > 0 {
114-
return errors.New(fmt.Sprintf("missing %s", pipedream.EnglishJoin(missing, true)))
114+
return fmt.Errorf("missing %s", pipedream.EnglishJoin(missing, true))
115115
}
116116
log.Println(endpoint)
117117
log.Println(region)

0 commit comments

Comments
 (0)