From 6bc75d77b688fef72760485ad27a1baa6157bfe9 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Fri, 9 Jul 2021 21:16:21 +0200 Subject: wiki: try a bit more cleanup --- skate/cmd/skate-wikipedia-doi/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'skate') 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 }) -- cgit v1.2.3