diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-04-28 17:22:03 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-04-28 17:22:03 +0200 |
commit | 81a6b83cb4a7d0ece97070cf45645cc2c7f11fd2 (patch) | |
tree | 693718abdc100d0c59ddcd02e80a55d25babdba7 | |
parent | 912acf09a7bd36defdbcf2b9b6ab268a259740a9 (diff) | |
download | refcat-81a6b83cb4a7d0ece97070cf45645cc2c7f11fd2.tar.gz refcat-81a6b83cb4a7d0ece97070cf45645cc2c7f11fd2.zip |
simplify switch
-rw-r--r-- | skate/schema.go | 8 |
1 files 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 { |