Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add go modules #2

Draft
wants to merge 2 commits into
base: plain-packages
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added example/example
Binary file not shown.
5 changes: 5 additions & 0 deletions example/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/KimoTek/Golang/example

go 1.14

require github.com/KimoTek/Golang/util v0.0.0-20200426210016-a9fca8f1bbb3
3 changes: 3 additions & 0 deletions example/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github.com/KimoTek/Golang v0.0.0-20200426210016-a9fca8f1bbb3 h1:c4hyiVKgorbjEOfmHJstDz3+HBddzDarYe3r3Jqs/Tc=
github.com/KimoTek/Golang/util v0.0.0-20200426210016-a9fca8f1bbb3 h1:ZypPyov6u8VqINGA61mI4nOPxMu2WEXVwyGzFMUaW3Q=
github.com/KimoTek/Golang/util v0.0.0-20200426210016-a9fca8f1bbb3/go.mod h1:x9EbXjrhjCyfcI+e2O5FwjID1TS5Mfld5p4kzi6V9t4=
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
}