aboutsummaryrefslogtreecommitdiffstats
path: root/skate
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-04-28 17:22:03 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-04-28 17:22:03 +0200
commit81a6b83cb4a7d0ece97070cf45645cc2c7f11fd2 (patch)
tree693718abdc100d0c59ddcd02e80a55d25babdba7 /skate
parent912acf09a7bd36defdbcf2b9b6ab268a259740a9 (diff)
downloadrefcat-81a6b83cb4a7d0ece97070cf45645cc2c7f11fd2.tar.gz
refcat-81a6b83cb4a7d0ece97070cf45645cc2c7f11fd2.zip
simplify switch
Diffstat (limited to 'skate')
-rw-r--r--skate/schema.go8
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 {