From 81a6b83cb4a7d0ece97070cf45645cc2c7f11fd2 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Wed, 28 Apr 2021 17:22:03 +0200 Subject: simplify switch --- skate/schema.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/skate/schema.go b/skate/schema.go index 2ff1483..d58d1e8 100644 --- a/skate/schema.go +++ b/skate/schema.go @@ -441,16 +441,12 @@ func OpenLibraryToRelease(w *OpenLibraryWork) (*Release, error) { } for _, v := range w.Isbn { switch { - case len(v) == 9 || len(v) == 10: - if w, err := isbn.To13(v); err == nil { - s.Add(w) - } - case len(v) == 12 || len(v) == 13: + case len(v) < 13: if w, err := isbn.To13(v); err == nil { s.Add(w) } default: - continue + s.Add(v) } } if len(w.Publisher) > 0 { -- cgit v1.2.3