Skip to content

Commit 4ed1bca

Browse files
committed
♻️ cleanup: sort imports
1 parent c29fbe1 commit 4ed1bca

File tree

219 files changed

+669
-328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+669
-328
lines changed

cmd/conf.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package cmd
22

33
import (
44
"fmt"
5+
"log"
6+
57
"github.com/spf13/cobra"
68
"gopkg.in/yaml.v2"
7-
"log"
89
)
910

1011
// confCommand 設定確認・ベース設定プリントコマンド

cmd/healthcheck.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package cmd
22

33
import (
44
"fmt"
5+
"net/http"
6+
57
"github.com/spf13/cobra"
68
"go.uber.org/zap"
7-
"net/http"
89
)
910

1011
// healthcheckCommand ヘルスチェックコマンド

cmd/root.go

+9-7
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@ package cmd
22

33
import (
44
"fmt"
5-
"github.com/blendle/zapdriver"
6-
"github.com/spf13/cobra"
7-
"github.com/spf13/pflag"
8-
"github.com/spf13/viper"
9-
"github.com/traPtitech/traQ/utils/message"
10-
"go.uber.org/zap"
11-
"go.uber.org/zap/zapcore"
125
"log"
136
"net/http"
147
_ "net/http/pprof" // pprof init
158
"os"
169
"os/signal"
1710
"strings"
1811
"syscall"
12+
13+
"github.com/blendle/zapdriver"
14+
"github.com/spf13/cobra"
15+
"github.com/spf13/pflag"
16+
"github.com/spf13/viper"
17+
"go.uber.org/zap"
18+
"go.uber.org/zap/zapcore"
19+
20+
"github.com/traPtitech/traQ/utils/message"
1921
)
2022

2123
var (

cmd/version.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cmd
22

33
import (
44
"fmt"
5+
56
"github.com/spf13/cobra"
67
)
78

main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package main
22

33
import (
4-
"github.com/traPtitech/traQ/cmd"
54
"log"
5+
6+
"github.com/traPtitech/traQ/cmd"
67
)
78

89
var (

model/bot_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package model
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"strings"
65
"testing"
6+
7+
"github.com/stretchr/testify/assert"
78
)
89

910
func TestBot_TableName(t *testing.T) {

model/channels_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package model
22

33
import (
4+
"testing"
5+
46
"github.com/gofrs/uuid"
57
"github.com/stretchr/testify/assert"
6-
"testing"
78
)
89

910
func TestChannel_TableName(t *testing.T) {

model/devices_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package model
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
5+
6+
"github.com/stretchr/testify/assert"
67
)
78

89
func TestDevice_TableName(t *testing.T) {

model/message_report_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package model
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
5+
6+
"github.com/stretchr/testify/assert"
67
)
78

89
func TestMessageReport_TableName(t *testing.T) {

model/message_stamp_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package model
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
5+
6+
"github.com/stretchr/testify/assert"
67
)
78

89
func TestMessageStamp_TableName(t *testing.T) {

model/oauth2_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package model
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
65
"time"
6+
7+
"github.com/stretchr/testify/assert"
78
)
89

910
func TestOAuth2Authorize_TableName(t *testing.T) {

model/pins_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package model
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
5+
6+
"github.com/stretchr/testify/assert"
67
)
78

89
func TestPinTableName(t *testing.T) {

model/stamps_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package model
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
5+
6+
"github.com/stretchr/testify/assert"
67
)
78

89
func TestStamp_TableName(t *testing.T) {

model/stars_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package model
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
5+
6+
"github.com/stretchr/testify/assert"
67
)
78

89
func TestStar_TableName(t *testing.T) {

model/user_group_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package model
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
5+
6+
"github.com/stretchr/testify/assert"
67
)
78

89
func TestUserGroup_TableName(t *testing.T) {

model/users_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ package model
22

33
import (
44
"encoding/hex"
5+
"testing"
6+
"testing/quick"
7+
58
"github.com/gofrs/uuid"
9+
610
"github.com/traPtitech/traQ/utils"
711
"github.com/traPtitech/traQ/utils/random"
8-
"testing"
9-
"testing/quick"
1012

1113
"github.com/stretchr/testify/assert"
1214
)

model/uuids.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ package model
33
import (
44
"database/sql/driver"
55
"errors"
6-
"github.com/gofrs/uuid"
76
"strings"
7+
8+
"github.com/gofrs/uuid"
89
)
910

1011
type UUIDs []uuid.UUID

model/webhooks_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package model
22

33
import (
4-
"github.com/gofrs/uuid"
5-
"github.com/stretchr/testify/assert"
64
"testing"
75
"time"
6+
7+
"github.com/gofrs/uuid"
8+
"github.com/stretchr/testify/assert"
89
)
910

1011
func TestWebhookBot_TableName(t *testing.T) {

repository/bot.go

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package repository
33

44
import (
55
"github.com/gofrs/uuid"
6+
67
"github.com/traPtitech/traQ/model"
78
"github.com/traPtitech/traQ/utils/optional"
89
)

repository/channel_impl_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ package repository
22

33
import (
44
"fmt"
5+
"testing"
6+
57
"github.com/gofrs/uuid"
68
"github.com/stretchr/testify/assert"
79
"github.com/stretchr/testify/require"
10+
811
"github.com/traPtitech/traQ/model"
912
"github.com/traPtitech/traQ/utils/optional"
10-
"testing"
1113
)
1214

1315
func TestGormRepository_UpdateChannel(t *testing.T) {

repository/clip.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package repository
22

33
import (
44
"github.com/gofrs/uuid"
5+
56
"github.com/traPtitech/traQ/model"
67
"github.com/traPtitech/traQ/utils/optional"
78
)

repository/clip_impl_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
package repository
22

33
import (
4+
"testing"
5+
46
"github.com/stretchr/testify/assert"
7+
58
"github.com/traPtitech/traQ/utils/optional"
69
random2 "github.com/traPtitech/traQ/utils/random"
7-
"testing"
810

911
"github.com/gofrs/uuid"
12+
1013
"github.com/traPtitech/traQ/model"
1114
)
1215

repository/device.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package repository
22

33
import (
44
"github.com/gofrs/uuid"
5+
56
"github.com/traPtitech/traQ/utils/set"
67
)
78

repository/device_impl_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package repository
22

33
import (
4+
"testing"
5+
46
"github.com/gofrs/uuid"
57
"github.com/stretchr/testify/assert"
8+
69
"github.com/traPtitech/traQ/model"
710
random2 "github.com/traPtitech/traQ/utils/random"
811
"github.com/traPtitech/traQ/utils/set"
9-
"testing"
1012
)
1113

1214
func TestRepositoryImpl_RegisterDevice(t *testing.T) {

repository/errors_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package repository
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
5+
6+
"github.com/stretchr/testify/assert"
67
)
78

89
func TestArgumentError_Error(t *testing.T) {

repository/file.go

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package repository
33

44
import (
55
"github.com/gofrs/uuid"
6+
67
"github.com/traPtitech/traQ/model"
78
"github.com/traPtitech/traQ/utils/optional"
89
)

repository/message_report.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package repository
22

33
import (
44
"github.com/gofrs/uuid"
5+
56
"github.com/traPtitech/traQ/model"
67
)
78

repository/message_report_impl.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package repository
22

33
import (
44
"github.com/gofrs/uuid"
5+
56
"github.com/traPtitech/traQ/model"
67
"github.com/traPtitech/traQ/utils/gormutil"
78
)

repository/oauth2.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package repository
22

33
import (
44
"github.com/gofrs/uuid"
5+
56
"github.com/traPtitech/traQ/model"
67
"github.com/traPtitech/traQ/utils/optional"
78
)

repository/pin.go

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package repository
33

44
import (
55
"github.com/gofrs/uuid"
6+
67
"github.com/traPtitech/traQ/model"
78
)
89

repository/pin_impl_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package repository
22

33
import (
4+
"testing"
5+
46
"github.com/gofrs/uuid"
57
"github.com/stretchr/testify/assert"
6-
"testing"
78
)
89

910
func TestRepositoryImpl_PinMessage(t *testing.T) {

repository/stamp.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package repository
22

33
import (
4+
"time"
5+
46
"github.com/gofrs/uuid"
7+
58
"github.com/traPtitech/traQ/model"
69
"github.com/traPtitech/traQ/utils/optional"
7-
"time"
810
)
911

1012
// CreateStampArgs スタンプ作成引数

repository/stamp_palette.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package repository
22

33
import (
44
"github.com/gofrs/uuid"
5+
56
"github.com/traPtitech/traQ/model"
67
"github.com/traPtitech/traQ/utils/optional"
78
)

repository/stamp_palette_impl_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package repository
22

33
import (
4+
"testing"
5+
46
"github.com/gofrs/uuid"
57
"github.com/stretchr/testify/assert"
8+
69
"github.com/traPtitech/traQ/utils/optional"
710
random2 "github.com/traPtitech/traQ/utils/random"
8-
"testing"
911
)
1012

1113
func TestRepositoryImpl_CreateStampPalette(t *testing.T) {

0 commit comments

Comments
 (0)