File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,17 @@ import (
7878)
7979
8080const (
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.
139147type MultipartUpload struct {
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments