mirror of
https://github.com/soypat/lneto.git
synced 2026-08-17 05:13:27 +00:00
CopyFrom pattern for DNS and use it for Cookie
This commit is contained in:
@@ -46,8 +46,8 @@ func (c *Cookie) ParseBytes(cookie []byte) error {
|
||||
return c.Parse()
|
||||
}
|
||||
|
||||
// CopyTo makes a copy of the cookie in dst argument. No memory is shared between cookies.
|
||||
func (c *Cookie) CopyTo(dst *Cookie) {
|
||||
// CopyFrom makes a copy of the argument cookie to the receiver dst argument. No memory is shared between cookies.
|
||||
func (dst *Cookie) CopyFrom(c Cookie) {
|
||||
dst.buf = append(dst.buf[:0], c.buf...)
|
||||
dst.kvs = append(dst.kvs[:0], c.kvs...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user