chore: make print pretty (#1967)

master
Kevin Wan 3 years ago committed by GitHub
parent 6c94e4652e
commit f366e1d936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -196,8 +196,9 @@ func (ng *engine) print() {
sort.Strings(routes)
fmt.Println("routes:")
for _, route := range routes {
fmt.Println(route)
fmt.Printf(" %s\n", route)
}
}

@ -350,7 +350,8 @@ func TestServer_PrintRoutes(t *testing.T) {
Name: foo
Port: 54321
`
expect = `GET /bar
expect = `routes:
GET /bar
GET /foo
GET /foo/:bar
GET /foo/:bar/baz

Loading…
Cancel
Save