summaryrefslogtreecommitdiff
path: root/pkg/utils
diff options
context:
space:
mode:
authorKyren223 <ulmliad223@gmail.com>2024-10-24 16:39:14 +0300
committerKyren223 <ulmliad223@gmail.com>2024-10-24 16:39:14 +0300
commit688668f6d34d4d962247bd5df60c3fca61185927 (patch)
tree459a29a76bb3a8cd77cdeccf35d7c1689374d09d /pkg/utils
parent6f83f199f8311bf7782da59bc2e07df38073e65a (diff)
feat: worked on client
Diffstat (limited to 'pkg/utils')
-rw-r--r--pkg/utils/utils.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go
new file mode 100644
index 0000000..3f4a805
--- /dev/null
+++ b/pkg/utils/utils.go
@@ -0,0 +1,11 @@
+package utils
+
+func Clamp(value, min, max int64) int64 {
+ if value < min {
+ return min
+ }
+ if value > max {
+ return max
+ }
+ return value
+}