diff --git a/go/03-modules/myMath/math.go b/go/03-modules/myMath/math.go index e69de29..de9b318 100644 --- a/go/03-modules/myMath/math.go +++ b/go/03-modules/myMath/math.go @@ -0,0 +1,23 @@ +package myMath + +import "fmt" + +func init() { + fmt.Println("initializing myMath") +} + +func Add(a, b int) int { + return a + b +} + +func greater(a, b int) bool { + return a > b +} + +func Min(a, b int) int { + if greater(a, b) { + return b + } else { + return a + } +}