Add mod and Makefile to speed development

This commit is contained in:
IamTheFij 2019-10-03 12:56:03 -07:00
parent 88b718cb59
commit 68ee048b76
4 changed files with 34 additions and 0 deletions

4
.gitignore vendored
View File

@ -12,4 +12,8 @@
# Output of the go coverage tool, specifically when used with LiteIDE # Output of the go coverage tool, specifically when used with LiteIDE
*.out *.out
# User configuration
config.yml config.yml
# Output binary
minitor-go

22
Makefile Normal file
View File

@ -0,0 +1,22 @@
.PHONY: test
default: test
.PHONY: build
build:
minitor-go:
go build
.PHONY: run
run: minitor-go
./minitor-go
.PHONY: test
test:
go test -coverprofile=coverage.out
go tool cover -func=coverage.out
.PHONY: clean
clean:
rm -f ./minitor-go
rm -f ./coverage.out

5
go.mod Normal file
View File

@ -0,0 +1,5 @@
module git.iamthefij.com/iamthefij/minitor-go
go 1.12
require gopkg.in/yaml.v2 v2.2.4

3
go.sum Normal file
View File

@ -0,0 +1,3 @@
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=