Skip to content

Commit

Permalink
chore: fix modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kimobrian committed Apr 26, 2020
1 parent 6efd7a7 commit a15b456
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions example/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module example
module github.com/KimoTek/Golang/example

go 1.14
go 1.13
9 changes: 5 additions & 4 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
5 changes: 0 additions & 5 deletions example/math/math.go

This file was deleted.

6 changes: 6 additions & 0 deletions example/mathutils/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package mathutils

// Mul2 returns given int times 2
func Mul2(x int) int {
return x * 2
}
4 changes: 2 additions & 2 deletions util/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module util
module github.com/KimoTek/Golang/util

go 1.14
go 1.13

0 comments on commit a15b456

Please sign in to comment.