diff options
author | Nick White <git@njw.name> | 2021-07-13 11:49:58 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2021-07-13 11:49:58 +0100 |
commit | e22c16ca84163636d674fb0935156f466169e1a3 (patch) | |
tree | 6d29d1ebea4a89dad706df79d40c6a37df2d4b01 /internal/pipeline/put.go | |
parent | 05fbc6c65c8556d89d8b7fdb645f3ef3b273b5e9 (diff) |
internal/pipeline: Reorganise interfaces so that functions only declare what they need
We were using Pipeliner as a catch-all, but it's nicer if the functions
can just state that e.g. they need download functionality, so decompose
things so that that's how we do things now.
Diffstat (limited to 'internal/pipeline/put.go')
-rw-r--r-- | internal/pipeline/put.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/pipeline/put.go b/internal/pipeline/put.go index 87e4c99..647b7a9 100644 --- a/internal/pipeline/put.go +++ b/internal/pipeline/put.go @@ -59,7 +59,7 @@ func CheckImages(dir string) error { return nil } -func DetectQueueType(dir string, conn Pipeliner) string { +func DetectQueueType(dir string, conn Queuer) string { // Auto detect type of queue to send to based on file extension pngdirs, _ := filepath.Glob(dir + "/*.png") jpgdirs, _ := filepath.Glob(dir + "/*.jpg") @@ -72,7 +72,7 @@ func DetectQueueType(dir string, conn Pipeliner) string { } } -func UploadImages(dir string, bookname string, conn Pipeliner) error { +func UploadImages(dir string, bookname string, conn Uploader) error { walker := make(fileWalk) go func() { _ = filepath.Walk(dir, walker.Walk) |