feat✨ 优化写法

This commit is contained in:
wenjianzhang committed 2021-05-12 18:50:13 +08:00
1 parent fd9df69d1f
commit 2580be08ab
1 file changed
-14
-14
View File
@@ -1,14 +0,0 @@
package models
type Routers struct {
List []Router
}
type Router struct {
HttpMethod, RelativePath string
}
func (e *Routers) Add(HttpMethod, RelativePath string) *Routers {
e.List = append(e.List, Router{HttpMethod: HttpMethod,RelativePath: RelativePath})
return e
}