Skip to content
Snippets Groups Projects
Commit 7f91db7f authored by vito.he's avatar vito.he
Browse files

Fix:lock transfer to defer

parent 307007b3
No related branches found
No related tags found
No related merge requests found
......@@ -305,12 +305,12 @@ func (c *URL) SetParam(key string, value string) {
func (c *URL) RangeParams(f func(key, value string) bool) {
c.paramsLock.RLock()
defer c.paramsLock.RUnlock()
for k, v := range c.params {
if !f(k, v[0]) {
break
}
}
c.paramsLock.RUnlock()
}
func (c URL) GetParam(s string, d string) string {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment