added String()
This commit is contained in:
parent
2e90ff9cae
commit
0792cfaa06
|
@ -10,6 +10,8 @@ import (
|
|||
// from a reader (typically bufio.NewRead of the socket)
|
||||
func Build(r io.Reader) (request *T, err error) {
|
||||
|
||||
/* (1) Parse request
|
||||
---------------------------------------------------------*/
|
||||
/* (1) Get chunk reader */
|
||||
cr := reader.NewReader(r)
|
||||
if err != nil {
|
||||
|
@ -40,14 +42,15 @@ func Build(r io.Reader) (request *T, err error) {
|
|||
|
||||
}
|
||||
|
||||
|
||||
/* (2) GET {uri} HTTP/{version}
|
||||
---------------------------------------------------------*/
|
||||
/* (1) Break apart */
|
||||
|
||||
|
||||
|
||||
/* (1) Check method */
|
||||
return nil, nil
|
||||
return req, nil
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// String returns a textual representation of the upgrade request
|
||||
func (r T) String() string{
|
||||
|
||||
return fmt.Sprintf("Upgrade Request\n - host: %s\n - port: %d\n", r.host, r.port)
|
||||
|
||||
}
|
Loading…
Reference in New Issue