From a9fca8f1bbb37e6eab9c306c13005dd0bf5e5151 Mon Sep 17 00:00:00 2001 From: kimobrian Date: Sun, 26 Apr 2020 23:09:54 +0300 Subject: [PATCH] chore: fix modules --- example/go.mod | 6 ++++-- example/go.sum | 3 +++ example/main.go | 9 +++++---- example/math/math.go | 5 ----- example/mathutils/main.go | 6 ++++++ util/go.mod | 4 ++-- 6 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 example/go.sum delete mode 100644 example/math/math.go create mode 100644 example/mathutils/main.go diff --git a/example/go.mod b/example/go.mod index e180640..4d37851 100644 --- a/example/go.mod +++ b/example/go.mod @@ -1,3 +1,5 @@ -module example +module github.com/KimoTek/Golang/example -go 1.14 +go 1.13 + +require github.com/Kimotek/Golang/util v0.0.0-20200426202928-45319dbe06e0 // indirect diff --git a/example/go.sum b/example/go.sum new file mode 100644 index 0000000..4bfed0d --- /dev/null +++ b/example/go.sum @@ -0,0 +1,3 @@ +github.com/Kimotek/Golang v0.0.0-20200426202928-45319dbe06e0 h1:RyEp+ED41JvrWB1eiz/fc4YAsVZpLBYMOIqKYDB6QW4= +github.com/Kimotek/Golang/util v0.0.0-20200426202928-45319dbe06e0 h1:7J6b+THJnsr5wgHScF0/cfoF9FsQRLodYbxMyjsBwYA= +github.com/Kimotek/Golang/util v0.0.0-20200426202928-45319dbe06e0/go.mod h1:w7sek4hjyEXZA479BTAQZ1ztEEU/+jvrgPmeHTsc0Cs= diff --git a/example/main.go b/example/main.go index b12142c..9156e39 100644 --- a/example/main.go +++ b/example/main.go @@ -2,11 +2,12 @@ package main import ( "fmt" - "example/math" - "util" + + "github.com/KimoTek/Golang/example/mathutils" + "github.com/Kimotek/Golang/util" ) func main() { - fmt.Println("Hello world! My lucky number is", math.Mul2(privateHelperFunc())) - fmt.Println("Square:::", util.Square(60)) + fmt.Println("Hello world! My lucky number is", mathutils.Mul2(privateHelperFunc())) + fmt.Println("Square:::", util.Square(60)) } diff --git a/example/math/math.go b/example/math/math.go deleted file mode 100644 index 82c2833..0000000 --- a/example/math/math.go +++ /dev/null @@ -1,5 +0,0 @@ -package math - -func Mul2(x int) int { - return x * 2 -} diff --git a/example/mathutils/main.go b/example/mathutils/main.go new file mode 100644 index 0000000..9c1579e --- /dev/null +++ b/example/mathutils/main.go @@ -0,0 +1,6 @@ +package mathutils + +// Mul2 returns given int times 2 +func Mul2(x int) int { + return x * 2 +} diff --git a/util/go.mod b/util/go.mod index 9a0d464..a7e41e1 100644 --- a/util/go.mod +++ b/util/go.mod @@ -1,3 +1,3 @@ -module util +module github.com/KimoTek/Golang/util -go 1.14 +go 1.13