aboutsummaryrefslogtreecommitdiff
path: root/cookie.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2016-03-06 00:17:08 +0200
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2016-03-06 00:17:08 +0200
commit8280b7a16235c880b8f6780cf6555d0e7ad3224f (patch)
treedf2d8f149435585f8aaeeb80000ebf91857139f6 /cookie.go
parentDo not expose noCopy.Lock (diff)
downloadfasthttp-8280b7a16235c880b8f6780cf6555d0e7ad3224f.tar.gz
fasthttp-8280b7a16235c880b8f6780cf6555d0e7ad3224f.tar.bz2
fasthttp-8280b7a16235c880b8f6780cf6555d0e7ad3224f.zip
Moved empty noCopy struct to the top of container structs. See @stemar94 's comment at https://github.com/golang/go/issues/12884 for details
Diffstat (limited to 'cookie.go')
-rw-r--r--cookie.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cookie.go b/cookie.go
index 758b19d..7bf921a 100644
--- a/cookie.go
+++ b/cookie.go
@@ -47,6 +47,8 @@ var cookiePool = &sync.Pool{
//
// Cookie instance MUST NOT be used from concurrently running goroutines.
type Cookie struct {
+ noCopy noCopy
+
key []byte
value []byte
expire time.Time
@@ -55,8 +57,6 @@ type Cookie struct {
bufKV argsKV
buf []byte
-
- noCopy noCopy
}
// CopyTo copies src cookie to c.