Browse Source

alias httprouter.Router Router

ls 5 years ago
parent
commit
539ae32e06
2 changed files with 5 additions and 1 deletions
  1. 4 1
      router.go
  2. 1 0
      wechat/client.go

+ 4 - 1
router.go

@@ -7,12 +7,15 @@ import (
 	"github.com/chuangxin1/httprouter"
 )
 
+// Router router
+type Router = httprouter.Router
+
 // Handle is a function that can be registered to a route to handle HTTP
 // requests. Like http.HandlerFunc.
 type Handle func(http.ResponseWriter, *http.Request)
 
 // NewRouter new http router with default route
-func NewRouter() *httprouter.Router {
+func NewRouter() *Router {
 	router := httprouter.New()
 
 	router.NotFound = http.HandlerFunc(notFoundHandler)

+ 1 - 0
wechat/client.go

@@ -54,6 +54,7 @@ type UserInfo struct {
 	Country        string `json:"country"`
 	HeadImgURL     string `json:"headimgurl"`
 	SubscribeTime  int    `json:"subscribe_time"`
+	UnionID        string `json:"unionid"`
 	Remark         string `json:"remark"`
 	GroupID        int    `json:"groupid"`
 	TagidList      []int  `json:"tagid_list"`