From 590a6f5915678b366134331e7cd0a40e4e19cdec Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 27 Mar 2021 09:18:07 +0800 Subject: [PATCH] chore(format): enable extra rules which should be vetted by a human --- Makefile | 2 +- gorush/notification_hms.go | 2 +- gorush/worker.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9a90448..9e934fe 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/gorush/notification_hms.go b/gorush/notification_hms.go index 933b853..6eb68c8 100644 --- a/gorush/notification_hms.go +++ b/gorush/notification_hms.go @@ -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") } diff --git a/gorush/worker.go b/gorush/worker.go index 50cf7c0..362ae4b 100644 --- a/gorush/worker.go +++ b/gorush/worker.go @@ -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++ {