improve ScanRequest doc string
This commit is contained in:
parent
70f0c6683e
commit
ae99c4b44f
2
spsrv.go
2
spsrv.go
|
@ -319,7 +319,7 @@ func parseRequest(r string) (host, path string, contentLength int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
// ScanRequest is like bufio.ScanBytes but returns a byte if no more \n is found
|
||||
// ScanRequest returns a line if we haven't scanned request line yet, else, returns a byte
|
||||
func ScanRequest(data []byte, atEOF bool) (advance int, token []byte, err error) {
|
||||
if atEOF && len(data) == 0 {
|
||||
return 0, nil, nil
|
||||
|
|
Loading…
Reference in New Issue