diff options
| author | Jeff Carr <[email protected]> | 2024-11-26 04:34:01 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-26 04:34:01 -0600 |
| commit | 316bc8ea81200a48b8a7259905720362b512ce2a (patch) | |
| tree | 411251bf71593f7e434f92cd0124108dafe365c6 /Makefile | |
Day 1
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..920c3d8 --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +# You must use the current protoc-gen-go +# +# go-clone --go-src google.golang.org/protobuf +# cd ~/go/src/google.golang.org/protobuf/cmd/protoc-gen-go +# go install + + +all: refs.pb.go vet + +vet: lint + GO111MODULE=off go vet + +lint: + # -buf lint refs.proto # todo: figure out where buf comes from again + +# autofixes your import headers in your golang files +goimports: + goimports -w *.go + make -C example goimports + +redomod: + rm -f go.* + GO111MODULE= go mod init + GO111MODULE= go mod tidy + +clean: + rm -f *.pb.go + -rm -f go.* + make -C example clean + +refs.pb.go: refs.proto + cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \ + --go_opt=Mrefs.proto=go.wit.com/lib/protobuf/gitpb \ + refs.proto |
