Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kataras committed Nov 17, 2020
1 parent 15e3a17 commit 2221a9a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 31 deletions.
17 changes: 5 additions & 12 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,23 +194,16 @@ func (c *Conn) Set(key string, value interface{}) {
}

// Get retruns a value based on the given "key"
// from this connection's store.
func (c *Conn) Get(key string) interface{} {
c.storeMutex.RLock()
if c.store != nil {
// We could use reflection to receive a pointer and perform some type checks
// but let that for the caller, it knows better.
if v, ok := c.store[key]; ok {
c.storeMutex.RUnlock()
if v == nil {
return nil
}
return v
}
if c.store == nil {
c.storeMutex.RUnlock()
return nil
}

v := c.store[key]
c.storeMutex.RUnlock()
return nil
return v
}

// Increment works like `Set` method.
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ module github.com/kataras/neffos
go 1.14

require (
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee // indirect
github.com/gobwas/pool v0.2.0 // indirect
github.com/gobwas/ws v1.0.3
github.com/gobwas/httphead v0.0.0-20200921212729-da3d93bc3c58 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.0.4
github.com/gorilla/websocket v1.4.2
github.com/iris-contrib/go.uuid v2.0.0+incompatible
github.com/mediocregopher/radix/v3 v3.5.0
github.com/nats-io/nats.go v1.9.2
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
github.com/mediocregopher/radix/v3 v3.6.0
github.com/nats-io/nats.go v1.10.0
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
)
23 changes: 10 additions & 13 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2221a9a

Please sign in to comment.