aboutsummaryrefslogtreecommitdiff
path: root/pkg/stack/min.go
diff options
context:
space:
mode:
authorJulien Dessaux2021-11-12 15:26:16 +0100
committerJulien Dessaux2021-11-12 15:28:09 +0100
commitc913c2ae46fd81a3274ef16c64c78ea2ed421de8 (patch)
treec454e21bfe42080fae433eae402b9f3a1c68783a /pkg/stack/min.go
parentFixed tricky field loading bug (diff)
downloadgofunge98-c913c2ae46fd81a3274ef16c64c78ea2ed421de8.tar.gz
gofunge98-c913c2ae46fd81a3274ef16c64c78ea2ed421de8.tar.bz2
gofunge98-c913c2ae46fd81a3274ef16c64c78ea2ed421de8.zip
Refactoring : isolate stack manipulation into their own package
Diffstat (limited to '')
-rw-r--r--pkg/stack/min.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/stack/min.go b/pkg/stack/min.go
new file mode 100644
index 0000000..e97aaed
--- /dev/null
+++ b/pkg/stack/min.go
@@ -0,0 +1,8 @@
+package stack
+
+func min(a, b int) int {
+ if a < b {
+ return a
+ }
+ return b
+}