From 59573b1fb8e5a47f924a636f0f46bd64ed19747e Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 20 Dec 2021 12:33:14 +0000 Subject: whitespace and error clarity changes --- internal/pipeline/get.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'internal') diff --git a/internal/pipeline/get.go b/internal/pipeline/get.go index 2559857..e9bb8b1 100644 --- a/internal/pipeline/get.go +++ b/internal/pipeline/get.go @@ -39,7 +39,6 @@ func DownloadBestPages(dir string, name string, conn Downloader) error { } func DownloadBestPngs(dir string, name string, conn Downloader) error { - key := filepath.Join(name, "best") fn := filepath.Join(dir, "best") err := conn.Download(conn.WIPStorageId(), key, fn) @@ -51,8 +50,7 @@ func DownloadBestPngs(dir string, name string, conn Downloader) error { return fmt.Errorf("Failed to open best file: %v", err) } defer f.Close() - - + s := bufio.NewScanner(f) for s.Scan() { imgname := strings.Replace(s.Text(), ".hocr", ".png", 1) @@ -67,7 +65,6 @@ func DownloadBestPngs(dir string, name string, conn Downloader) error { return nil } - func DownloadPdfs(dir string, name string, conn Downloader) error { for _, suffix := range []string{".colour.pdf", ".binarised.pdf"} { key := filepath.Join(name, name+suffix) -- cgit v1.2.1-24-ge1ad