From 627d1e4d19028a942f0db0f77d6c31f441b23435 Mon Sep 17 00:00:00 2001 From: Clemens Geibel Date: Fri, 12 Aug 2022 11:41:44 +0200 Subject: [PATCH] Remove Exception. --- src/main/cljc/dda/c4k_gitea/gitea.cljc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/cljc/dda/c4k_gitea/gitea.cljc b/src/main/cljc/dda/c4k_gitea/gitea.cljc index 81349bf..8e55138 100644 --- a/src/main/cljc/dda/c4k_gitea/gitea.cljc +++ b/src/main/cljc/dda/c4k_gitea/gitea.cljc @@ -44,13 +44,12 @@ (def vol? (s/keys :req-un [::volume-total-storage-size])) -(defn root-storage-by-volume-size - [in] +(defn-spec root-storage-by-volume-size int? + [volume-total-storage-size ::volume-total-storage-size] (cond - (<= in 5) (throw (Exception. "Volume smaller or equal 5Gi!\nIncrease volume-total-storage-size to value > 5")) - (and (> in 5) (<= in 20)) 5 - (and (> in 20) (<= in 100)) 10 - (> in 100) 20)) + (and (> volume-total-storage-size 5) (<= volume-total-storage-size 20)) 5 + (and (> volume-total-storage-size 20) (<= volume-total-storage-size 100)) 10 + (> volume-total-storage-size 100) 20)) (defn data-storage-by-volume-size [total root]