1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00
echo/engine/standard/url.go
Vishal Rana e4ab053bc8 More godoc
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-14 23:33:16 -07:00

34 lines
563 B
Go

package standard
import "net/url"
type (
// URL implements `engine.URL`.
URL struct {
*url.URL
query url.Values
}
)
// Path implements `engine.URL#Path` method.
func (u *URL) Path() string {
return u.URL.Path
}
// SetPath implements `engine.URL#SetPath` method.
func (u *URL) SetPath(path string) {
u.URL.Path = path
}
// QueryValue implements `engine.URL#QueryValue` method.
func (u *URL) QueryValue(name string) string {
if u.query == nil {
u.query = u.Query()
}
return u.query.Get(name)
}
func (u *URL) reset(url *url.URL) {
u.URL = url
}