go-ozzo / ozzo-routing

An extremely fast Go (golang) HTTP router that supports regular expression route matching. Comes with full support for building RESTful APIs.
MIT License
453 stars 51 forks source link

404 error while trying to request / #9

Closed MetalGuardian closed 8 years ago

MetalGuardian commented 8 years ago

I receive 404 error while trying to request /

2016/01/02 15:33:17 [127.0.0.1] [0.095ms] GET / HTTP/1.1 404 9

using the example code

r.Get("", func(c *routing.Context) {
    c.Write("Welcome, ozzo!")
})

If I change code to

r.Get("/", func(c *routing.Context) {...})

then request is successful

Tests are running successfully

kolkov commented 8 years ago

Hi! Qiang changed the source code and documentation. Now it is not work! ( Example from English README.md

// set up routes and handlers
    r.Get("", func(c *routing.Context) {
        fmt.Fprint(c.Response, "Go ozzo!")
    })
qiangxue commented 8 years ago

Core code and readme are both fixed. Thanks!