summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorNick White <git@njw.name>2022-10-27 16:32:07 +0100
committerNick White <git@njw.name>2022-10-27 16:32:07 +0100
commit2aabbfeb7173d682fc28cc512afc13bab2ce0ee7 (patch)
tree151e3b93c971bd391b59906e89a97d8104493420 /cmd
parent811601e4b446b1c598af965b74155f7f76ffb7e9 (diff)
gofmt
Diffstat (limited to 'cmd')
-rw-r--r--cmd/rescribe/gbook.go4
-rw-r--r--cmd/rescribe/gbook_test.go2
-rw-r--r--cmd/rescribe/getembeds.go4
-rw-r--r--cmd/rescribe/gui.go6
-rw-r--r--cmd/rescribe/main.go4
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
}