aboutsummaryrefslogtreecommitdiffstats
path: root/skate
diff options
context:
space:
mode:
Diffstat (limited to 'skate')
-rw-r--r--skate/cmd/skate-from-unstructured/main.go7
-rw-r--r--skate/map.go2
2 files changed, 7 insertions, 2 deletions
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)