aboutsummaryrefslogtreecommitdiff
path: root/uri.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 /uri.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 'uri.go')
-rw-r--r--uri.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/uri.go b/uri.go
index fc3f25b..464ccd7 100644
--- a/uri.go
+++ b/uri.go
@@ -36,6 +36,8 @@ var uriPool = &sync.Pool{
//
// URI instance MUST NOT be used from concurrently running goroutines.
type URI struct {
+ noCopy noCopy
+
pathOriginal []byte
scheme []byte
path []byte
@@ -50,8 +52,6 @@ type URI struct {
requestURI []byte
h *RequestHeader
-
- noCopy noCopy
}
// CopyTo copies uri contents to dst.