From 2aabbfeb7173d682fc28cc512afc13bab2ce0ee7 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 27 Oct 2022 16:32:07 +0100 Subject: gofmt --- cmd/rescribe/gbook.go | 4 ++-- cmd/rescribe/gbook_test.go | 2 +- cmd/rescribe/getembeds.go | 4 ++-- cmd/rescribe/gui.go | 6 +++--- cmd/rescribe/main.go | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/rescribe/gbook.go b/cmd/rescribe/gbook.go index fe2f4b8..320f574 100644 --- a/cmd/rescribe/gbook.go +++ b/cmd/rescribe/gbook.go @@ -77,8 +77,8 @@ func getMetadata(id string) (string, string, string, error) { // designed to be unmarshalled by encoding/json's Unmarshal() type bookInfo struct { VolumeInfo struct { - Title string - Authors []string + Title string + Authors []string PublishedDate string } } diff --git a/cmd/rescribe/gbook_test.go b/cmd/rescribe/gbook_test.go index 6cd5a63..56b4b40 100644 --- a/cmd/rescribe/gbook_test.go +++ b/cmd/rescribe/gbook_test.go @@ -11,7 +11,7 @@ import ( func Test_getBookIdFromUrl(t *testing.T) { cases := []struct { url string - id string + id string }{ {"https://books.google.it/books?id=QjQepCuN8JYC", "QjQepCuN8JYC"}, {"https://www.google.it/books/edition/_/VJbr-Oe2au0C", "VJbr-Oe2au0C"}, diff --git a/cmd/rescribe/getembeds.go b/cmd/rescribe/getembeds.go index 90f22ec..92dd8c4 100644 --- a/cmd/rescribe/getembeds.go +++ b/cmd/rescribe/getembeds.go @@ -2,7 +2,7 @@ // Use of this source code is governed by the GPLv3 // license that can be found in the LICENSE file. -// +build ignore +//go:build ignore // this downloads the needed files to embed into the binary, // and is run by `go generate` @@ -81,7 +81,7 @@ func present(url string, sum string) bool { } func main() { - urls := []struct{ + urls := []struct { url string sum string }{ diff --git a/cmd/rescribe/gui.go b/cmd/rescribe/gui.go index 5031f0d..f03d66e 100644 --- a/cmd/rescribe/gui.go +++ b/cmd/rescribe/gui.go @@ -35,9 +35,9 @@ var progressPoints = map[float64]string{ } var trainingNames = map[string]string{ - "eng": "English (modern print)", - "lat": "Latin (modern print)", - "rescribev9_fast": "Latin/English/French (printed ca 1500-1800)", + "eng": "English (modern print)", + "lat": "Latin (modern print)", + "rescribev9_fast": "Latin/English/French (printed ca 1500-1800)", } // copyStdoutToChan creates a pipe to copy anything written diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go index 16ca024..c9118a8 100644 --- a/cmd/rescribe/main.go +++ b/cmd/rescribe/main.go @@ -435,9 +435,9 @@ func rmIfNotImage(f string) error { r.Close() if err == nil { b := strings.TrimSuffix(f, ".jpg") - err = os.Rename(f, b + ".png") + err = os.Rename(f, b+".png") if err != nil { - return fmt.Errorf("Error renaming %s to %s: %v", f, b + ".png", err) + return fmt.Errorf("Error renaming %s to %s: %v", f, b+".png", err) } return nil } -- cgit v1.2.1-24-ge1ad