Skip to content

Commit

Permalink
still more lint warning regarding various comments issues
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Dec 27, 2020
1 parent d9cf044 commit 6cf57a9
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion server/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const (
ProxyReqMeUserAgent
)

// Proxy event types processed in the clusterWriteLoop.
// ProxyEventType is an enumeration of possible proxy event types processed in the clusterWriteLoop.
type ProxyEventType int

// Individual proxy events.
Expand Down
9 changes: 3 additions & 6 deletions server/concurrency/goroutinepool.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/******************************************************************************
*
* Description :
* A very basic and naive implementation of thread pool.
*
*****************************************************************************/
// Package concurrency is a very simple implementation of a mutex with channels.
// Provides TryLock functionality absent in Go's regular sync.Mutex.
// See https://github.com/golang/go/issues/6123 for details.
package concurrency

// Task represents a work task to be run on the specified thread pool.
Expand Down
3 changes: 0 additions & 3 deletions server/concurrency/simplemutex.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Package concurrency is a very simple implementation of a mutex with channels.
// Provides TryLock functionality absent in Go's regular sync.Mutex.
// See https://github.com/golang/go/issues/6123 for details.
package concurrency

// SimpleMutex is a channel used for locking.
Expand Down
2 changes: 1 addition & 1 deletion server/datamodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ func NoErrDeliveredParams(id, topic string, ts time.Time, params interface{}) *S

// 3xx

// InfoValidateCredentials requires user to confirm credentials before going forward (300).
// InfoValidateCredentialsExplicitTs requires user to confirm credentials before going forward (300).
func InfoValidateCredentials(id string, ts time.Time) *ServerComMessage {
return InfoValidateCredentialsExplicitTs(id, ts, ts)
}
Expand Down
2 changes: 1 addition & 1 deletion server/push/tnpg/push_tnpg.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func (Handler) Push() chan<- *push.Receipt {
return handler.input
}

// Push returns a channel that the server will use to send messages to.
// Channel returns a channel that the server will use to send group requests to.
// If the adapter blocks, the message will be dropped.
func (Handler) Channel() chan<- *push.ChannelReq {
return handler.channel
Expand Down
14 changes: 7 additions & 7 deletions server/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,15 @@ func (s *Session) stopSession(data interface{}) {
s.stop <- data
}

func (sess *Session) purgeChannels() {
for len(sess.send) > 0 {
<-sess.send
func (s *Session) purgeChannels() {
for len(s.send) > 0 {
<-s.send
}
for len(sess.stop) > 0 {
<-sess.stop
for len(s.stop) > 0 {
<-s.stop
}
for len(sess.detach) > 0 {
<-sess.detach
for len(s.detach) > 0 {
<-s.detach
}
}

Expand Down
3 changes: 1 addition & 2 deletions server/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ func (h *histogram) addSample(v float64) {
func (h *histogram) String() string {
if r, err := json.Marshal(h); err == nil {
return string(r)
} else {
return ""
}
return ""
}

type varUpdate struct {
Expand Down

0 comments on commit 6cf57a9

Please sign in to comment.