From 118d5bac457d163e25140624ccdcb0ed7dba820f Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Wed, 12 May 2021 00:22:28 +0200 Subject: cleanup: normalize to lowercase dois --- skate/cmd/skate-cleanup/main.go | 4 ++-- 1 file 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 } -- cgit v1.2.3