1-init-project #7

Merged
faercol merged 3 commits from 1-init-project into main 2023-01-05 18:06:21 +00:00
5 changed files with 33 additions and 0 deletions
Showing only changes of commit bd9bba54ba - Show all commits

3
.gitignore vendored
View file

@ -15,6 +15,9 @@
# Output of the go coverage tool, specifically when used with LiteIDE # Output of the go coverage tool, specifically when used with LiteIDE
*.out *.out
# build directory
tracker/build
# Dependency directories (remove the comment below to include it) # Dependency directories (remove the comment below to include it)
# vendor/ # vendor/

7
tracker/Makefile Normal file
View file

@ -0,0 +1,7 @@
.PHONY: build test
build:
go build -o build/
test:
go test -v ./...

3
tracker/go.mod Normal file
View file

@ -0,0 +1,3 @@
module git.faercol.me/faercol/public-ip-tracker/tracker
go 1.16

11
tracker/main.go Normal file
View file

@ -0,0 +1,11 @@
package main
import "fmt"
func testMethod(a int) int {
return a + 2
}
func main() {
fmt.Println("public ip tracker")
}

9
tracker/main_test.go Normal file
View file

@ -0,0 +1,9 @@
package main
import "testing"
func TestTestMethod(t *testing.T) {
if testMethod(12) != 14 {
t.Fatalf("Unexpected result %d", testMethod((12)))
}
}