fix(sam): go vet fix for ptr receiver
This commit is contained in:
@@ -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 {
|
||||
@@ -19,7 +19,7 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func (Subscriptions) New() *Subscriptions {
|
||||
func NewSubscriptions() *Subscriptions {
|
||||
return &Subscriptions{sync.RWMutex{}, make(map[string]*Subscription)}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user