* 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 удалений

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

@@ -8,6 +8,7 @@ import (
"net/http"
plugin "github.com/hashicorp/go-plugin"
"github.com/mattermost/mattermost-server/v5/model"
)

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

@@ -9,10 +9,10 @@ import (
"go/token"
"go/types"
"github.com/pkg/errors"
"github.com/mattermost/mattermost-server/v5/plugin/checker/internal/asthelpers"
"github.com/mattermost/mattermost-server/v5/plugin/checker/internal/version"
"github.com/pkg/errors"
)
func checkHelpersVersionComments(pkgPath string) (result, error) {

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

@@ -20,6 +20,7 @@ import (
"github.com/dyatlov/go-opengraph/opengraph"
"github.com/hashicorp/go-plugin"
"github.com/mattermost/mattermost-server/v5/mlog"
"github.com/mattermost/mattermost-server/v5/model"
)

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

@@ -12,11 +12,12 @@ import (
"sync"
"time"
"github.com/pkg/errors"
"github.com/mattermost/mattermost-server/v5/einterfaces"
"github.com/mattermost/mattermost-server/v5/mlog"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/mattermost/mattermost-server/v5/utils"
"github.com/pkg/errors"
)
var ErrNotFound = errors.New("Item not found")

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

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

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

@@ -10,6 +10,7 @@ import (
"strings"
"github.com/hashicorp/go-hclog"
"github.com/mattermost/mattermost-server/v5/mlog"
)

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

@@ -10,10 +10,11 @@ import (
"testing"
"time"
"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/utils"
"github.com/stretchr/testify/require"
)
func TestPluginHealthCheck(t *testing.T) {

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

@@ -8,12 +8,13 @@ import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/mattermost/mattermost-server/v5/plugin"
"github.com/mattermost/mattermost-server/v5/plugin/plugintest"
"github.com/mattermost/mattermost-server/v5/plugin/plugintest/mock"
"github.com/mattermost/mattermost-server/v5/utils/fileutils"
"github.com/stretchr/testify/assert"
)
func TestEnsureBot(t *testing.T) {

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

@@ -6,10 +6,11 @@ package plugin_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/mattermost/mattermost-server/v5/plugin"
"github.com/mattermost/mattermost-server/v5/plugin/plugintest"
"github.com/stretchr/testify/assert"
)
func TestCheckRequiredServerConfiguration(t *testing.T) {

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

@@ -7,10 +7,11 @@ import (
"strconv"
"testing"
"github.com/stretchr/testify/assert"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/mattermost/mattermost-server/v5/plugin"
"github.com/mattermost/mattermost-server/v5/plugin/plugintest"
"github.com/stretchr/testify/assert"
)
func TestKVGetJSON(t *testing.T) {

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

@@ -10,8 +10,9 @@ import (
"time"
"github.com/blang/semver"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/pkg/errors"
"github.com/mattermost/mattermost-server/v5/model"
)
// InstallPluginFromURL implements Helpers.InstallPluginFromURL.

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

@@ -10,13 +10,14 @@ import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/mattermost/mattermost-server/v5/plugin"
"github.com/mattermost/mattermost-server/v5/plugin/plugintest"
"github.com/mattermost/mattermost-server/v5/plugin/plugintest/mock"
"github.com/mattermost/mattermost-server/v5/utils/fileutils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestInstallPluginFromURL(t *testing.T) {

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

@@ -4,9 +4,10 @@
package plugin
import (
"testing"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"testing"
)
func TestStringify(t *testing.T) {

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

@@ -13,6 +13,7 @@ import (
"time"
plugin "github.com/hashicorp/go-plugin"
"github.com/mattermost/mattermost-server/v5/einterfaces"
"github.com/mattermost/mattermost-server/v5/mlog"
"github.com/mattermost/mattermost-server/v5/model"

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

@@ -9,11 +9,12 @@ import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
"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/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestSupervisor(t *testing.T) {