From b760d7bb9a08538903778dfcab5b3440f27dded6 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Wed, 28 Apr 2021 01:35:04 +0200 Subject: update docs --- skate/cmd/skate-from-unstructured/main.go | 7 ++++++- skate/map.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'skate') diff --git a/skate/cmd/skate-from-unstructured/main.go b/skate/cmd/skate-from-unstructured/main.go index 2c6e81f..c2015e2 100644 --- a/skate/cmd/skate-from-unstructured/main.go +++ b/skate/cmd/skate-from-unstructured/main.go @@ -68,7 +68,12 @@ func parseUnstructured(ref *skate.Ref) error { ref.Biblio.DOI = v } // DOI in URL - prefixes := []string{"http://doi.org/", "https://doi.org/", "http://dx.doi.org/", "https://dx.doi.org/"} + prefixes := []string{ + "http://doi.org/", + "https://doi.org/", + "http://dx.doi.org/", + "https://dx.doi.org/", + } for _, prefix := range prefixes { if ref.Biblio.DOI != "" && strings.HasPrefix(ref.Biblio.Url, prefix) { ref.Biblio.DOI = strings.Replace(ref.Biblio.Url, prefix, "", -1) diff --git a/skate/map.go b/skate/map.go index b06bf96..5584371 100644 --- a/skate/map.go +++ b/skate/map.go @@ -40,7 +40,7 @@ type PartialDoc struct { // doc). We want fields, but we do not want to bake in TSV into each function. type Mapper func([]byte) ([][]byte, error) -// AsTSV serialized the result of a field mapper as AsTSV. This is a slim adapter, +// AsTSV serializes the result of a field mapper as TSV. This is a slim adapter, // e.g. to parallel.Processor, which expects this function signature. func (f Mapper) AsTSV(p []byte) ([]byte, error) { fields, err := f(p) -- cgit v1.2.3