chore(format): enable extra rules which should be vetted by a human

This commit is contained in:
Bo-Yi Wu 2021-03-27 09:18:07 +08:00
parent f34deb0eac
commit 590a6f5915
3 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ EXECUTABLE := gorush
GO ?= go
DEPLOY_ACCOUNT := appleboy
DEPLOY_IMAGE := $(EXECUTABLE)
GOFMT ?= gofumpt -l -s
GOFMT ?= gofumpt -l -s -extra
TARGETS ?= linux darwin windows openbsd
ARCHS ?= amd64 386

View File

@ -32,7 +32,7 @@ func GetPushClient(conf *config.Config) (*core.HMSClient, error) {
}
// InitHMSClient use for initialize HMS Client.
func InitHMSClient(apiKey string, appID string) (*core.HMSClient, error) {
func InitHMSClient(apiKey, appID string) (*core.HMSClient, error) {
if apiKey == "" {
return nil, errors.New("Missing Huawei API Key")
}

View File

@ -7,7 +7,7 @@ import (
)
// InitWorkers for initialize all workers.
func InitWorkers(ctx context.Context, wg *sync.WaitGroup, workerNum int64, queueNum int64) {
func InitWorkers(ctx context.Context, wg *sync.WaitGroup, workerNum, queueNum int64) {
LogAccess.Info("worker number is ", workerNum, ", queue number is ", queueNum)
QueueNotification = make(chan PushNotification, queueNum)
for i := int64(0); i < workerNum; i++ {