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