pass context to image uploaders

This commit is contained in:
bergquist
2017-09-15 15:05:48 +02:00
parent d0ab028cfc
commit c7698a09ed
5 changed files with 13 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
package imguploader
import (
"context"
"fmt"
"regexp"
@@ -8,13 +9,13 @@ import (
)
type ImageUploader interface {
Upload(path string) (string, error)
Upload(ctx context.Context, path string) (string, error)
}
type NopImageUploader struct {
}
func (NopImageUploader) Upload(path string) (string, error) {
func (NopImageUploader) Upload(ctx context.Context, path string) (string, error) {
return "", nil
}