Consolidates the V struct

This commit is contained in:
sm
2018-03-08 16:15:44 -08:00
parent ce2faa39eb
commit 56bd8445a4
3 changed files with 8 additions and 12 deletions
+1 -6
View File
@@ -13,11 +13,6 @@ import (
"mcquay.me/metrics"
)
type v struct {
Hostname string `json:"hostname"`
V string `json:"version"`
}
func main() {
m, err := metrics.New("hw")
if err != nil {
@@ -29,7 +24,7 @@ func main() {
}
http.HandleFunc("/", m.WrapFunc("/", func(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Content-Type", "application/json")
r := v{
r := hw.V{
Hostname: hn,
V: hw.Version,
}