chore: make print pretty (#1967)
This commit is contained in:
@@ -196,8 +196,9 @@ func (ng *engine) print() {
|
|||||||
|
|
||||||
sort.Strings(routes)
|
sort.Strings(routes)
|
||||||
|
|
||||||
|
fmt.Println("routes:")
|
||||||
for _, route := range routes {
|
for _, route := range routes {
|
||||||
fmt.Println(route)
|
fmt.Printf(" %s\n", route)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -350,10 +350,11 @@ func TestServer_PrintRoutes(t *testing.T) {
|
|||||||
Name: foo
|
Name: foo
|
||||||
Port: 54321
|
Port: 54321
|
||||||
`
|
`
|
||||||
expect = `GET /bar
|
expect = `routes:
|
||||||
GET /foo
|
GET /bar
|
||||||
GET /foo/:bar
|
GET /foo
|
||||||
GET /foo/:bar/baz
|
GET /foo/:bar
|
||||||
|
GET /foo/:bar/baz
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user