refactor: shorten a method name
This commit is contained in:
1 parent
79d3a2821f
commit
c158b86dc6
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func (router *Router) GenerateStatusJSON(version, encryption string) ([]byte, error) {
|
||||
func (router *Router) StatusJSON(version, encryption string) ([]byte, error) {
|
||||
return json.Marshal(struct {
|
||||
Version string
|
||||
Encryption string
|
||||
|
||||
+1
-1
@@ -179,7 +179,7 @@ func handleHTTP(router *weave.Router, httpAddr string) {
|
||||
})
|
||||
|
||||
muxRouter.Methods("GET").Path("/status-json").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
json, _ := router.GenerateStatusJSON(version, encryption)
|
||||
json, _ := router.StatusJSON(version, encryption)
|
||||
w.Write(json)
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user