From 7cbbc9eb009a3458ae847a2e5c1b529561d1465c Mon Sep 17 00:00:00 2001 From: Dzyanis Kuzmenka Date: Thu, 17 Mar 2022 13:03:59 +0300 Subject: [PATCH] enable gci linter --- .golangci.yml | 1 - cmd/sachet/config.go | 6 +++--- cmd/sachet/handlers.go | 4 ++-- cmd/sachet/main.go | 8 ++++---- provider/aliyun/aliyun.go | 4 ++-- provider/messagebird/messagebird.go | 4 ++-- provider/nexmo/nexmo.go | 4 ++-- provider/ovh/ovh.go | 4 ++-- provider/pushbullet/pushbullet.go | 4 ++-- provider/sms77/sms77.go | 4 ++-- provider/telegram/telegram.go | 4 ++-- provider/tencentcloud/tencentcloud.go | 4 ++-- provider/textmagic/textmagic.go | 4 ++-- 13 files changed, 27 insertions(+), 28 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 98707f7..8e6c9ce 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -60,7 +60,6 @@ linters: enable-all: true disable: # TODO: enable one by one - - gci - ireturn - forbidigo - containedctx diff --git a/cmd/sachet/config.go b/cmd/sachet/config.go index 05848bb..3a4e09b 100644 --- a/cmd/sachet/config.go +++ b/cmd/sachet/config.go @@ -3,6 +3,9 @@ package main import ( "io/ioutil" + "github.com/prometheus/alertmanager/template" + "gopkg.in/yaml.v2" + "github.com/messagebird/sachet/provider/aliyun" "github.com/messagebird/sachet/provider/aspsms" "github.com/messagebird/sachet/provider/cm" @@ -30,9 +33,6 @@ import ( "github.com/messagebird/sachet/provider/textmagic" "github.com/messagebird/sachet/provider/turbosms" "github.com/messagebird/sachet/provider/twilio" - - "github.com/prometheus/alertmanager/template" - "gopkg.in/yaml.v2" ) type ReceiverConf struct { diff --git a/cmd/sachet/handlers.go b/cmd/sachet/handlers.go index 5dbf97f..8ffc256 100644 --- a/cmd/sachet/handlers.go +++ b/cmd/sachet/handlers.go @@ -7,9 +7,9 @@ import ( "net/http" "strings" - "github.com/messagebird/sachet" - "github.com/prometheus/alertmanager/template" + + "github.com/messagebird/sachet" ) type handlers struct{} diff --git a/cmd/sachet/main.go b/cmd/sachet/main.go index cfff730..5fa5e84 100644 --- a/cmd/sachet/main.go +++ b/cmd/sachet/main.go @@ -9,6 +9,10 @@ import ( "os" "strconv" + "github.com/heptiolabs/healthcheck" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" + "github.com/messagebird/sachet" "github.com/messagebird/sachet/provider/aliyun" "github.com/messagebird/sachet/provider/aspsms" @@ -37,10 +41,6 @@ import ( "github.com/messagebird/sachet/provider/textmagic" "github.com/messagebird/sachet/provider/turbosms" "github.com/messagebird/sachet/provider/twilio" - - "github.com/heptiolabs/healthcheck" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promhttp" ) var ( diff --git a/provider/aliyun/aliyun.go b/provider/aliyun/aliyun.go index 2acce56..34a8d67 100644 --- a/provider/aliyun/aliyun.go +++ b/provider/aliyun/aliyun.go @@ -5,9 +5,9 @@ import ( "fmt" "strings" - sachet "github.com/messagebird/sachet" - "github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi" + + "github.com/messagebird/sachet" ) type Config struct { diff --git a/provider/messagebird/messagebird.go b/provider/messagebird/messagebird.go index 681ed3f..7d45320 100644 --- a/provider/messagebird/messagebird.go +++ b/provider/messagebird/messagebird.go @@ -5,11 +5,11 @@ import ( "log" "os" - "github.com/messagebird/sachet" - messagebird "github.com/messagebird/go-rest-api" sms "github.com/messagebird/go-rest-api/sms" voicemessage "github.com/messagebird/go-rest-api/voicemessage" + + "github.com/messagebird/sachet" ) type Config struct { diff --git a/provider/nexmo/nexmo.go b/provider/nexmo/nexmo.go index cd0dba1..f0ba83a 100644 --- a/provider/nexmo/nexmo.go +++ b/provider/nexmo/nexmo.go @@ -1,9 +1,9 @@ package nexmo import ( - "github.com/messagebird/sachet" - nexmo "gopkg.in/njern/gonexmo.v1" + + "github.com/messagebird/sachet" ) type Config struct { diff --git a/provider/ovh/ovh.go b/provider/ovh/ovh.go index 5ef40e1..2ca4416 100644 --- a/provider/ovh/ovh.go +++ b/provider/ovh/ovh.go @@ -3,9 +3,9 @@ package ovh import ( "fmt" - "github.com/messagebird/sachet" - "github.com/ovh/go-ovh/ovh" + + "github.com/messagebird/sachet" ) type Config struct { diff --git a/provider/pushbullet/pushbullet.go b/provider/pushbullet/pushbullet.go index 000eaf4..57fecfb 100644 --- a/provider/pushbullet/pushbullet.go +++ b/provider/pushbullet/pushbullet.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" - "github.com/messagebird/sachet" - "github.com/xconstruct/go-pushbullet" + + "github.com/messagebird/sachet" ) const ( diff --git a/provider/sms77/sms77.go b/provider/sms77/sms77.go index c5a8ea0..2c5ee76 100644 --- a/provider/sms77/sms77.go +++ b/provider/sms77/sms77.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" - "github.com/messagebird/sachet" - "github.com/sms77io/go-client/sms77api" + + "github.com/messagebird/sachet" ) // Config is the configuration struct for Sms77 provider. diff --git a/provider/telegram/telegram.go b/provider/telegram/telegram.go index b7e88e8..7f260bb 100644 --- a/provider/telegram/telegram.go +++ b/provider/telegram/telegram.go @@ -3,9 +3,9 @@ package telegram import ( "strconv" - "github.com/messagebird/sachet" - tgbotapi "gopkg.in/telegram-bot-api.v4" + + "github.com/messagebird/sachet" ) type Config struct { diff --git a/provider/tencentcloud/tencentcloud.go b/provider/tencentcloud/tencentcloud.go index 78d7d08..956e4df 100644 --- a/provider/tencentcloud/tencentcloud.go +++ b/provider/tencentcloud/tencentcloud.go @@ -5,12 +5,12 @@ import ( "errors" "fmt" - "github.com/messagebird/sachet" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" tcError "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" sms "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms/v20190711" + + "github.com/messagebird/sachet" ) type Config struct { diff --git a/provider/textmagic/textmagic.go b/provider/textmagic/textmagic.go index f85c9bf..1b397bc 100644 --- a/provider/textmagic/textmagic.go +++ b/provider/textmagic/textmagic.go @@ -5,9 +5,9 @@ import ( "fmt" "strings" - "github.com/messagebird/sachet" - textmagic "github.com/textmagic/textmagic-rest-go-v2/v2" + + "github.com/messagebird/sachet" ) type Config struct {