separate into handler package and add New* functions

This commit is contained in:
2020-09-16 15:07:16 -04:00
parent da4e3ec935
commit 87b909a31c
3 changed files with 196 additions and 173 deletions

17
handlers/request.go Normal file
View File

@@ -0,0 +1,17 @@
package handlers
import "net/url"
func NewRequest(url *url.URL) *Request {
return &Request{
url: url,
}
}
type Request struct {
url *url.URL
}
func (r *Request) GetURL() *url.URL {
return r.url
}