summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-26 04:08:35 -0500
committerJeff Carr <[email protected]>2024-10-26 04:08:35 -0500
commitfd85215d5744998a53c6e11a7ce2a866badcd22c (patch)
tree7384d47372ca35467d7c412ecd7f32a4c02fe2be /Makefile
go vet works
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
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.*