Skip to content

Commit 2221a9a

Browse files
committed
update deps
1 parent 15e3a17 commit 2221a9a

File tree

3 files changed

+21
-31
lines changed

3 files changed

+21
-31
lines changed

conn.go

+5-12
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,16 @@ func (c *Conn) Set(key string, value interface{}) {
194194
}
195195

196196
// Get retruns a value based on the given "key"
197-
// from this connection's store.
198197
func (c *Conn) Get(key string) interface{} {
199198
c.storeMutex.RLock()
200-
if c.store != nil {
201-
// We could use reflection to receive a pointer and perform some type checks
202-
// but let that for the caller, it knows better.
203-
if v, ok := c.store[key]; ok {
204-
c.storeMutex.RUnlock()
205-
if v == nil {
206-
return nil
207-
}
208-
return v
209-
}
199+
if c.store == nil {
200+
c.storeMutex.RUnlock()
201+
return nil
210202
}
211203

204+
v := c.store[key]
212205
c.storeMutex.RUnlock()
213-
return nil
206+
return v
214207
}
215208

216209
// Increment works like `Set` method.

go.mod

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ module github.com/kataras/neffos
33
go 1.14
44

55
require (
6-
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee // indirect
7-
github.com/gobwas/pool v0.2.0 // indirect
8-
github.com/gobwas/ws v1.0.3
6+
github.com/gobwas/httphead v0.0.0-20200921212729-da3d93bc3c58 // indirect
7+
github.com/gobwas/pool v0.2.1 // indirect
8+
github.com/gobwas/ws v1.0.4
99
github.com/gorilla/websocket v1.4.2
1010
github.com/iris-contrib/go.uuid v2.0.0+incompatible
11-
github.com/mediocregopher/radix/v3 v3.5.0
12-
github.com/nats-io/nats.go v1.9.2
13-
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
11+
github.com/mediocregopher/radix/v3 v3.6.0
12+
github.com/nats-io/nats.go v1.10.0
13+
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
1414
)

go.sum

+10-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)