aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd/skate-wikipedia-doi/main.go
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-07-09 21:16:21 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-07-09 21:16:21 +0200
commit6bc75d77b688fef72760485ad27a1baa6157bfe9 (patch)
treee834388e24dd360f1544aa74288a5a3bea515e19 /skate/cmd/skate-wikipedia-doi/main.go
parent0406b312fc27582f4cc54b2005330e4929b73b90 (diff)
downloadrefcat-6bc75d77b688fef72760485ad27a1baa6157bfe9.tar.gz
refcat-6bc75d77b688fef72760485ad27a1baa6157bfe9.zip
wiki: try a bit more cleanup
Diffstat (limited to 'skate/cmd/skate-wikipedia-doi/main.go')
-rw-r--r--skate/cmd/skate-wikipedia-doi/main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/skate/cmd/skate-wikipedia-doi/main.go b/skate/cmd/skate-wikipedia-doi/main.go
index 07de520..be3be0a 100644
--- a/skate/cmd/skate-wikipedia-doi/main.go
+++ b/skate/cmd/skate-wikipedia-doi/main.go
@@ -31,7 +31,11 @@ func main() {
if ids.DOI == "" || !skate.PatDOI.MatchString(ids.DOI) {
return nil, nil
}
- s := fmt.Sprintf("%s\t%s\t%s", ids.DOI, strings.TrimSpace(w.PageTitle), string(p))
+ var (
+ doi = strings.TrimSpace(ids.DOI)
+ pageTitle = strings.TrimSpace(w.PageTitle)
+ s = fmt.Sprintf("%s\t%s\t%s", doi, pageTitle, string(p))
+ )
return []byte(s), nil
})