diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b96172c --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +VERSION = $(shell git describe --tags) + +# create the go.mod and go.sum if this is a brand new repo +# REDOMOD = $(shell if [ -e go.mod ]; then echo go.mod; else echo no go mod; fi) +REDOMOD = $(shell if [ -e go.sum ]; then echo go.sum exists; else GO111MODULE= go mod init; GO111MODULE= go mod tidy; fi) + +all: + GO111MODULE=off go vet + +goimports: + goimports -w *.go + +redomod: + rm -f go.* + GO111MODULE= go mod init + GO111MODULE= go mod tidy + +clean: + rm -f go.* |
