3
0

fix(sam): go vet fix for ptr receiver

This commit is contained in:
Tit Petric
2018-08-15 18:15:12 +02:00
parent 1a8b9dc6ba
commit 9959ce8fba
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ func (Session) New(ctx context.Context, conn *websocket.Conn) *Session {
conn: conn,
ctx: ctx,
config: config,
subs: Subscriptions{}.New(),
subs: NewSubscriptions(),
send: make(chan []byte, 512),
stop: make(chan []byte, 1),
}
@@ -13,14 +13,14 @@ type (
}
)
func (Store) New() *Store {
func NewStore() *Store {
return &Store{sync.RWMutex{}, make(map[uint64]*Session)}
}
var store *Store
func init() {
store = Store{}.New()
store = NewStore()
}
func (s *Store) Save(session *Session) *Session {
+1 -1
View File
@@ -19,7 +19,7 @@ type (
}
)
func (Subscriptions) New() *Subscriptions {
func NewSubscriptions() *Subscriptions {
return &Subscriptions{sync.RWMutex{}, make(map[string]*Subscription)}
}