Add JSON tags

This commit is contained in:
lordwelch 2020-06-16 05:32:53 -07:00
parent b6dfdcd5ef
commit f147fb47bb
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ PKGS := github.com/rtr7/router7/cmd/... \
build:
mkdir -p result
GOOS=linux go build -o ./result github.com/rtr7/router7/cmd/...
GOOS=linux go build -o ./result/rtr7-init -ldflags "-X main.buildTimestamp=$(shell date '+%Y-%m-%dT%H:%M:%S%z') -X github.com/gokrazy/gokrazy.httpPassword=temp" init/init.go
GOOS=linux go build -o ./result/rtr7-init -ldflags "-X main.buildTimestamp=$(shell date '+%Y-%m-%dT%H:%M:%S%z') -X github.com/gokrazy/gokrazy.httpPassword=hello" init/init.go
clean:
rm -rf result

View File

@ -44,9 +44,9 @@ var log = teelogger.NewConsole()
type lcHostname string
type IP struct {
IPv6 net.IP
IPv4 net.IP
Host lcHostname // lease that the IPs are updated from. If no lease exists for this host it is never updated.
IPv6 net.IP `json:"ipv6"`
IPv4 net.IP `json:"ipv4"`
Host lcHostname `json:"host"` // lease that the IPs are updated from. If no lease exists for this host it is never updated.
}
type Server struct {