diff options
| -rw-r--r-- | Makefile | 22 | ||||
| -rw-r--r-- | generate.go | 15 | ||||
| -rw-r--r-- | table.custom.go | 6 |
3 files changed, 29 insertions, 14 deletions
@@ -1,6 +1,16 @@ -all: proto goimports vet +all: generate -redo: clean proto goimports vet +generate: clean + go mod init + go mod tidy + go generate + +go-generate: + rm -f *.pb.go *.patch + +proto: + autogenpb --proto widget.proto + autogenpb --proto table.proto vet: @GO111MODULE=off go vet @@ -9,13 +19,5 @@ vet: goimports: goimports -w *.go -proto: widget.pb.go table.pb.go - -widget.pb.go: widget.proto - autogenpb --proto widget.proto - -table.pb.go: table.proto - autogenpb --proto table.proto - clean: rm -f go.* *.pb.go diff --git a/generate.go b/generate.go new file mode 100644 index 0000000..9053df6 --- /dev/null +++ b/generate.go @@ -0,0 +1,15 @@ +package guipb + +// NOTE: it would be helpful if go.mod doesn't exist, that go generate +// would automatically run go mod init and go mod tidy +// and allow directives to 'go get go.wit.com/apps/autogenpb' +// then this process could be fully automated +// +//go:generate make go-generate +// # go:generate go get go.wit.com/apps/autogenpb # can't do this here since this repo is a GO "primitive" library (no deps) +// # go:generate go install -v go.wit.com/apps/autogenpb +//go:generate autogenpb --proto widget.proto +//go:generate autogenpb --proto table.proto +// # go:generate go get golang.org/x/tools # repo seems broken at this time (?) +// # go:generate go install -v golang.org/x/tools/cmd/goimports +//go:generate bash -c "goimports -w *.go" diff --git a/table.custom.go b/table.custom.go index abed9a5..c8672ae 100644 --- a/table.custom.go +++ b/table.custom.go @@ -10,17 +10,15 @@ package guipb -import "go.wit.com/log" - func (pb *Tables) Custom(w *Widget) { - log.Info("got to guipb.Custom() for pb", pb.GetUuid(), "widget id", w) + // log.Info("got to guipb.Custom() for pb", pb.GetUuid(), "widget id", w) if mycustom != nil { mycustom(w) } } func (pb *Table) Custom(w *Widget) { - log.Info("got to guipb.Custom() for pb", pb.GetUuid(), "widget id", w) + // log.Info("got to guipb.Custom() for pb", pb.GetUuid(), "widget id", w) if mycustom != nil { mycustom(w) } |
