diff options
author | Aliaksandr Valialkin <valyala@gmail.com> | 2015-12-19 20:38:10 +0200 |
---|---|---|
committer | Aliaksandr Valialkin <valyala@gmail.com> | 2015-12-19 20:38:10 +0200 |
commit | 5ff6be8feeceaeb4250153cf29b79ec657eb9c7a (patch) | |
tree | 6567f53965849f5e68fbf038a5bf6aff17adc652 /cookie.go | |
parent | Clarify Append* return values (diff) | |
download | fasthttp-5ff6be8feeceaeb4250153cf29b79ec657eb9c7a.tar.gz fasthttp-5ff6be8feeceaeb4250153cf29b79ec657eb9c7a.tar.bz2 fasthttp-5ff6be8feeceaeb4250153cf29b79ec657eb9c7a.zip |
Substitute AppendBytesStr by append()
Diffstat (limited to 'cookie.go')
-rw-r--r-- | cookie.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -51,7 +51,7 @@ func (c *Cookie) Path() []byte { // SetPath sets cookie path. func (c *Cookie) SetPath(path string) { - c.buf = AppendBytesStr(c.buf[:0], path) + c.buf = append(c.buf[:0], path...) c.path = normalizePath(c.path, c.buf) } @@ -70,7 +70,7 @@ func (c *Cookie) Domain() []byte { // SetDomain sets cookie domain. func (c *Cookie) SetDomain(domain string) { - c.domain = AppendBytesStr(c.domain[:0], domain) + c.domain = append(c.domain[:0], domain...) } // SetDomain @@ -108,7 +108,7 @@ func (c *Cookie) Value() []byte { // SetValue sets cookie value. func (c *Cookie) SetValue(value string) { - c.value = AppendBytesStr(c.value[:0], value) + c.value = append(c.value[:0], value...) } // SetValueBytes sets cookie value. @@ -125,7 +125,7 @@ func (c *Cookie) Key() []byte { // SetKey sets cookie name. func (c *Cookie) SetKey(key string) { - c.key = AppendBytesStr(c.key[:0], key) + c.key = append(c.key[:0], key...) } // SetKeyBytes sets cookie name. @@ -192,7 +192,7 @@ var errNoCookies = errors.New("no cookies found") // Parse parses Set-Cookie header. func (c *Cookie) Parse(src string) error { - c.buf = AppendBytesStr(c.buf[:0], src) + c.buf = append(c.buf[:0], src...) return c.ParseBytes(c.buf) } |