aboutsummaryrefslogtreecommitdiffstats
path: root/skate
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-04-28 01:35:04 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-04-28 01:35:04 +0200
commitb760d7bb9a08538903778dfcab5b3440f27dded6 (patch)
treed9dd8feec7c769678ef7a8907867b60b3a605765 /skate
parent59afe1e58dcaed9c328d72fcdffb0f669c34d6b6 (diff)
downloadrefcat-b760d7bb9a08538903778dfcab5b3440f27dded6.tar.gz
refcat-b760d7bb9a08538903778dfcab5b3440f27dded6.zip
update docs
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)