Skip to content

Commit

Permalink
enable gci linter
Browse files Browse the repository at this point in the history
  • Loading branch information
dzyanis committed Mar 17, 2022
1 parent 6023394 commit 7cbbc9e
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 28 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ linters:
enable-all: true
disable:
# TODO: enable one by one
- gci
- ireturn
- forbidigo
- containedctx
Expand Down
6 changes: 3 additions & 3 deletions cmd/sachet/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions cmd/sachet/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"net/http"
"strings"

"github.com/messagebird/sachet"

"github.com/prometheus/alertmanager/template"

"github.com/messagebird/sachet"
)

type handlers struct{}
Expand Down
8 changes: 4 additions & 4 deletions cmd/sachet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions provider/aliyun/aliyun.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions provider/messagebird/messagebird.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions provider/nexmo/nexmo.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package nexmo

import (
"github.com/messagebird/sachet"

nexmo "gopkg.in/njern/gonexmo.v1"

"github.com/messagebird/sachet"
)

type Config struct {
Expand Down
4 changes: 2 additions & 2 deletions provider/ovh/ovh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions provider/pushbullet/pushbullet.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"strings"

"github.com/messagebird/sachet"

"github.com/xconstruct/go-pushbullet"

"github.com/messagebird/sachet"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions provider/sms77/sms77.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions provider/telegram/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions provider/tencentcloud/tencentcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions provider/textmagic/textmagic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7cbbc9e

Please sign in to comment.