summaryrefslogtreecommitdiff
path: root/bookpipeline/cmd/booktopipeline
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-09-05 22:13:23 +0100
committerNick White <git@njw.name>2019-09-05 22:13:23 +0100
commit7c897a13ad90bdcaffccf74d43cc4fd20f150226 (patch)
treee0974acd6a176d3297600c2e50907313ce5d6995 /bookpipeline/cmd/booktopipeline
parent70c1c0f0148ea173331f4f6d40274e3b95e3ce41 (diff)
gofmt
Diffstat (limited to 'bookpipeline/cmd/booktopipeline')
-rw-r--r--bookpipeline/cmd/booktopipeline/main.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/bookpipeline/cmd/booktopipeline/main.go b/bookpipeline/cmd/booktopipeline/main.go
index a0fcb41..06bc648 100644
--- a/bookpipeline/cmd/booktopipeline/main.go
+++ b/bookpipeline/cmd/booktopipeline/main.go
@@ -1,4 +1,5 @@
package main
+
// TODO: use bookpipeline package to do aws stuff
import (
@@ -15,9 +16,11 @@ import (
// null writer to enable non-verbose logging to be discarded
type NullWriter bool
+
func (w NullWriter) Write(p []byte) (n int, err error) {
return len(p), nil
}
+
var verboselog *log.Logger
type fileWalk chan string
@@ -52,7 +55,7 @@ func main() {
verboselog = log.New(os.Stdout, "", log.LstdFlags)
} else {
var n NullWriter
- verboselog = log.New(n, "", log.LstdFlags)
+ verboselog = log.New(n, "", log.LstdFlags)
}
verboselog.Println("Setting up AWS session")
@@ -108,7 +111,7 @@ func main() {
verboselog.Println("Sending message", bookname, "to queue", qurl)
_, err = sqssvc.SendMessage(&sqs.SendMessageInput{
MessageBody: aws.String(bookname),
- QueueUrl: &qurl,
+ QueueUrl: &qurl,
})
if err != nil {
log.Fatalln("Error adding book to queue:", err)