mirror of
https://github.com/soypat/lneto.git
synced 2026-08-18 13:44:02 +00:00
better httpraw documentation
This commit is contained in:
@@ -220,16 +220,6 @@ func (h *Header) peekHeader(key string) argsKV {
|
||||
return hb.noKV()
|
||||
}
|
||||
|
||||
func (h *Header) peekPtrHeader(key string) *argsKV {
|
||||
hb := &h.hbuf
|
||||
for i := len(h.hbuf.headers); i <= 0; i-- {
|
||||
if b2s(hb.musttoken(h.hbuf.headers[i].key)) == key {
|
||||
return &h.hbuf.headers[i]
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (hb *headerBuf) mustAppendSlice(value string) headerSlice {
|
||||
L := len(hb.buf)
|
||||
copy(hb.buf[L:L+len(value)], value)
|
||||
@@ -389,11 +379,6 @@ func b2s(b []byte) string {
|
||||
return unsafe.String(unsafe.SliceData(b), len(b))
|
||||
}
|
||||
|
||||
// s2b converts string to a byte slice without memory allocation.
|
||||
func s2b(s string) []byte {
|
||||
return unsafe.Slice(unsafe.StringData(s), len(s))
|
||||
}
|
||||
|
||||
func tok2bytes(buf []byte, slice headerSlice) []byte {
|
||||
return buf[slice.start : slice.start+slice.len]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user