summaryrefslogtreecommitdiff
path: root/cmd/iiifdownloader/main.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2021-07-23 16:17:40 +0100
committerNick White <git@njw.name>2021-07-23 16:17:40 +0100
commitb571f780dcc4baafa659bebbc316204a46e42f4f (patch)
treeb892958a63fd95b63b5f0e3591fabb53a272a537 /cmd/iiifdownloader/main.go
parent80a68210b4332e2d83e6b3e48a9ac94218d59f8b (diff)
gofmt
Diffstat (limited to 'cmd/iiifdownloader/main.go')
-rw-r--r--cmd/iiifdownloader/main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/iiifdownloader/main.go b/cmd/iiifdownloader/main.go
index cbb0d5c..6ae2f52 100644
--- a/cmd/iiifdownloader/main.go
+++ b/cmd/iiifdownloader/main.go
@@ -82,7 +82,7 @@ func parseMets(u string, c *http.Client) ([]string, error) {
// designed to be unmarshalled by encoding/xml's Unmarshal()
type metsXML struct {
FileGrps []struct {
- Attr string `xml:"USE,attr"`
+ Attr string `xml:"USE,attr"`
Files []struct {
Url string `xml:"href,attr"`
} `xml:"file>FLocat"`
@@ -168,8 +168,8 @@ func parseIIIFManifest(u string, c *http.Client) ([]string, error) {
// redirects to a info.json unless we manually add the appropriate
// iiif parameters.
if strings.HasPrefix(u, "https://iiif.bodleian.ox.ac.uk") &&
- !strings.HasSuffix(u, ".jpg") && !strings.HasSuffix(u, ".jpeg") &&
- !strings.HasSuffix(u, ".png") {
+ !strings.HasSuffix(u, ".jpg") && !strings.HasSuffix(u, ".jpeg") &&
+ !strings.HasSuffix(u, ".png") {
u += "/full/full/0/native.jpg"
}
urls = append(urls, u)
@@ -192,7 +192,7 @@ func urlToPgName(u string) string {
}
if b != "default.jpg" && b != "native.jpg" &&
- b != "default.png" && b != "native.png" {
+ b != "default.png" && b != "native.png" {
if path.Ext(b) == "" {
return b + ext
}
@@ -203,7 +203,7 @@ func urlToPgName(u string) string {
if len(f) < 5 {
return safe
}
- name := f[len(f) - 5]
+ name := f[len(f)-5]
f2 := strings.Split(name, "_")
var numpart, pgnum string