aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-05-12 00:22:28 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-05-12 00:22:28 +0200
commit118d5bac457d163e25140624ccdcb0ed7dba820f (patch)
tree9c138474d5bb8effdd9f3a2887797e7df5905ceb
parent5923185345449f89281f6d5208e6f09dc29b41b9 (diff)
downloadrefcat-118d5bac457d163e25140624ccdcb0ed7dba820f.tar.gz
refcat-118d5bac457d163e25140624ccdcb0ed7dba820f.zip
cleanup: normalize to lowercase dois
-rw-r--r--skate/cmd/skate-cleanup/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/skate/cmd/skate-cleanup/main.go b/skate/cmd/skate-cleanup/main.go
index e81d4ee..969c53c 100644
--- a/skate/cmd/skate-cleanup/main.go
+++ b/skate/cmd/skate-cleanup/main.go
@@ -75,7 +75,7 @@ func urlFilter(p []byte) ([]byte, error) {
return []byte(strings.Join(parts, *delimiter)), nil
}
-// doiFilter finds a DOI
+// doiFilter finds a DOI, normalizes to lowercase.
func doiFilter(p []byte) ([]byte, error) {
parts := strings.Split(string(p), *delimiter)
if len(parts) < *index {
@@ -91,6 +91,6 @@ func doiFilter(p []byte) ([]byte, error) {
if result == "" && *skipNonMatches {
return nil, nil
}
- parts[*index-1] = result
+ parts[*index-1] = strings.ToLower(result)
return []byte(strings.Join(parts, *delimiter)), nil
}