fix golint issues in core/queue (#507)

This commit is contained in:
Kevin Wan
2021-02-22 16:38:42 +08:00
committed by GitHub
parent 6e4c98e52d
commit 497762ab47
6 changed files with 78 additions and 51 deletions

View File

@@ -2,11 +2,13 @@ package queue
import "github.com/tal-tech/go-zero/core/errorx"
// A MultiPusher is a pusher that can push messages to multiple underlying pushers.
type MultiPusher struct {
name string
pushers []Pusher
}
// NewMultiPusher returns a MultiPusher.
func NewMultiPusher(pushers []Pusher) Pusher {
return &MultiPusher{
name: generateName(pushers),
@@ -14,10 +16,12 @@ func NewMultiPusher(pushers []Pusher) Pusher {
}
}
// Name returns the name of pusher.
func (pusher *MultiPusher) Name() string {
return pusher.name
}
// Push pushes a message into the underlying queue.
func (pusher *MultiPusher) Push(message string) error {
var batchError errorx.BatchError