* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w`

* added goimports lint check to .golangci.yml

* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w` for a corner case

* make app-layers, *-mocks and store-layers for ci check

Co-authored-by: Mahmudul Haque <mahmudulhaque@protonmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Agniva De Sarker
2021-01-07 22:42:43 +05:30
коммит произвёл GitHub
родитель 0c2c31bb0a
Коммит e89b26e8f3
337 изменённых файлов: 728 добавлений и 508 удалений

Просмотреть файл

@@ -7,10 +7,10 @@ import (
"os"
"testing"
"github.com/mattermost/mattermost-server/v5/config"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v5/config"
"github.com/mattermost/mattermost-server/v5/model"
)

Просмотреть файл

@@ -12,13 +12,13 @@ import (
"github.com/jmoiron/sqlx"
"github.com/pkg/errors"
"github.com/mattermost/mattermost-server/v5/mlog"
"github.com/mattermost/mattermost-server/v5/model"
// Load the MySQL driver
_ "github.com/go-sql-driver/mysql"
// Load the Postgres driver
_ "github.com/lib/pq"
"github.com/mattermost/mattermost-server/v5/mlog"
"github.com/mattermost/mattermost-server/v5/model"
)
// MaxWriteLength defines the maximum length accepted for write to the Configurations or

Просмотреть файл

@@ -9,10 +9,10 @@ import (
"os"
"testing"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v5/config/config_generator/generator"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v5/model"
)
func TestDefaultsGenerator(t *testing.T) {

Просмотреть файл

@@ -6,8 +6,9 @@ package config
import (
"testing"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v5/model"
)
func modifiedDefault(modify func(*model.Config)) *model.Config {

Просмотреть файл

@@ -5,6 +5,7 @@ package config
import (
"github.com/jmoiron/sqlx"
"github.com/mattermost/mattermost-server/v5/model"
)

Просмотреть файл

@@ -9,11 +9,12 @@ import (
"strconv"
"strings"
"github.com/mattermost/mattermost-server/v5/mlog"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/pkg/errors"
"github.com/splitio/go-client/v6/splitio/client"
"github.com/splitio/go-client/v6/splitio/conf"
"github.com/mattermost/mattermost-server/v5/mlog"
"github.com/mattermost/mattermost-server/v5/model"
)
type FeatureFlagSyncParams struct {

Просмотреть файл

@@ -6,8 +6,9 @@ package config
import (
"testing"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v5/model"
)
func TestGetStructFields(t *testing.T) {

Просмотреть файл

@@ -9,10 +9,11 @@ import (
"github.com/go-sql-driver/mysql"
"github.com/lib/pq"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v5/mlog"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/mattermost/mattermost-server/v5/testlib"
"github.com/stretchr/testify/require"
)
var mainHelper *testlib.MainHelper

Просмотреть файл

@@ -3,7 +3,9 @@
package config
import "github.com/pkg/errors"
import (
"github.com/pkg/errors"
)
// Migrate migrates SAML keys, certificates, and other config files from one store to another given their data source names.
func Migrate(from, to string) error {

Просмотреть файл

@@ -9,10 +9,11 @@ import (
"path"
"testing"
"github.com/mattermost/mattermost-server/v5/config"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v5/config"
"github.com/mattermost/mattermost-server/v5/model"
)
func TestMigrate(t *testing.T) {

Просмотреть файл

@@ -8,9 +8,10 @@ import (
"encoding/json"
"sync"
"github.com/pkg/errors"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/mattermost/mattermost-server/v5/utils/jsonutils"
"github.com/pkg/errors"
)
// Listener is a callback function invoked when the configuration changes.

Просмотреть файл

@@ -9,8 +9,9 @@ import (
"path/filepath"
"testing"
"github.com/mattermost/mattermost-server/v5/config"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v5/config"
)
func TestNewStore(t *testing.T) {

Просмотреть файл

@@ -6,9 +6,10 @@ package config
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/mattermost/mattermost-server/v5/utils"
"github.com/stretchr/testify/assert"
)
func TestDesanitize(t *testing.T) {