fixes for 'go vet'
This commit is contained in:
parent
d214d670ac
commit
53dbe44d38
13
Makefile
13
Makefile
|
@ -7,13 +7,20 @@ BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
|
||||||
# REDOMOD = $(shell if [ -e go.mod ]; then echo go.mod; else echo no go mod; fi)
|
# 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)
|
REDOMOD = $(shell if [ -e go.sum ]; then echo go.sum exists; else GO111MODULE= go mod init; GO111MODULE= go mod tidy; fi)
|
||||||
|
|
||||||
all: goimports build
|
all: goimports gocui
|
||||||
./zookeeper
|
# ./zookeeper
|
||||||
|
|
||||||
|
vet:
|
||||||
|
@GO111MODULE=off go vet
|
||||||
|
@echo this go binary package builds okay
|
||||||
|
|
||||||
nogui:
|
nogui:
|
||||||
./zookeeper --gui nocui
|
./zookeeper --gui nocui
|
||||||
|
|
||||||
build:
|
gocui: build
|
||||||
|
./zookeeper --gui gocui >/tmp/forge.log 2>&1
|
||||||
|
|
||||||
|
build: goimports vet
|
||||||
GO111MODULE=off go build -v -x \
|
GO111MODULE=off go build -v -x \
|
||||||
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||||
|
|
||||||
|
|
3
http.go
3
http.go
|
@ -9,7 +9,6 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"go.wit.com/lib/protobuf/forgepb"
|
|
||||||
"go.wit.com/lib/protobuf/zoopb"
|
"go.wit.com/lib/protobuf/zoopb"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
@ -43,6 +42,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
handleMachine(r, w, hostname, msg)
|
handleMachine(r, w, hostname, msg)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/*
|
||||||
var m *zoopb.Machine
|
var m *zoopb.Machine
|
||||||
m = new(zoopb.Machine)
|
m = new(zoopb.Machine)
|
||||||
if err := m.Unmarshal(msg); err != nil {
|
if err := m.Unmarshal(msg); err != nil {
|
||||||
|
@ -65,6 +65,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
fmt.Fprintln(w, "notsure")
|
fmt.Fprintln(w, "notsure")
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if route == "/status" {
|
if route == "/status" {
|
||||||
|
|
Loading…
Reference in New Issue