From c41300879e8375c98ecd23181e042bb40a81d6ed Mon Sep 17 00:00:00 2001 From: Drew Bednar Date: Sat, 23 Mar 2024 07:39:31 -0400 Subject: [PATCH] Initial commit --- README.md | 3 +++ go.mod | 3 +++ maths.go | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100644 README.md create mode 100644 go.mod create mode 100644 maths.go diff --git a/README.md b/README.md new file mode 100644 index 0000000..7a75933 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Exmod1 is an Example Golang Module + +This is a module used to learn golang modules. \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..3843819 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.runcible.io/learning/exmod1 + +go 1.21.0 diff --git a/maths.go b/maths.go new file mode 100644 index 0000000..dbee74b --- /dev/null +++ b/maths.go @@ -0,0 +1,11 @@ +package maths + +// Add adds two integers a and b together, returning the result. +func Add(a, b int) int { + return a + b +} + +// Sub subtracts integer b from integer a, returning the result +func Sub(a, b int) int { + return a - b +}