Fix golint issues

This commit is contained in:
Claudemiro
2018-11-26 22:57:50 +01:00
parent 3c51d0b614
commit 05c088f158
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ func newClientHook(channel *channel.Channel, s *subscription.Subscription, event
return hookEvent{Name: "client_event", Channel: channel.ID, Event: event, Data: data, SocketID: s.Connection.SocketID}
}
// channel_occupied
// TriggerChannelOccupiedHook channel_occupied
// { "name": "channel_occupied", "channel": "test_channel" }
func (a *Application) TriggerChannelOccupiedHook(c *channel.Channel) {
event := newChannelOcuppiedHook(c)
+2 -2
View File
@@ -27,7 +27,7 @@ type ListenerFunc func(*Channel, *subscription.Subscription)
// ClientEventListenerFunc listener for client events
type ClientEventListenerFunc func(*Channel, *subscription.Subscription, string, interface{})
// A Channel
// Channel represents an application channel
type Channel struct {
sync.RWMutex
@@ -43,7 +43,7 @@ type Channel struct {
clientEventListeners []ClientEventListenerFunc
}
// Create a new Channel
// New Create a new Channel
func New(channelID string, options ...Option) *Channel {
log.Infof("Creating a new Channel: %s", channelID)
+3 -3
View File
@@ -39,7 +39,7 @@ func NewSubscribe(channel, auth, channelData string) Subscribe {
return Subscribe{Event: "pusher:subscribe", Data: data}
}
// UnsubscribeData
// UnsubscribeData event data
type UnsubscribeData struct {
Channel string `json:"channel"`
}
@@ -56,7 +56,7 @@ type Unsubscribe struct {
Data UnsubscribeData `json:"data"`
}
// Create a new unsubscribe event for the specified channel
// NewUnsubscribe Create a new unsubscribe event for the specified channel
func NewUnsubscribe(channel string) Unsubscribe {
data := UnsubscribeData{Channel: channel}
return Unsubscribe{Event: "pusher:unsubscribe", Data: data}
@@ -73,7 +73,7 @@ type SubscriptionSucceeded struct {
Data string `json:"data"`
}
// Create a new subscription succeed event for the specified channel
// NewSubscriptionSucceeded Create a new subscription succeed event for the specified channel
func NewSubscriptionSucceeded(channel, data string) SubscriptionSucceeded {
return SubscriptionSucceeded{Event: "pusher_internal:subscription_succeeded", Channel: channel, Data: data}
}
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"sync"
)
// storage represents a app database
// Storage represents a app database
// For now it there is only one memory database implementation
// but in the future I can write a sql implementation
type Storage interface {