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

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

@@ -3,7 +3,9 @@
package model
import "github.com/francoispqt/gojay"
import (
"github.com/francoispqt/gojay"
)
// AuditModelTypeConv converts key model types to something better suited for audit output.
func AuditModelTypeConv(val interface{}) (newVal interface{}, converted bool) {

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

@@ -3,7 +3,9 @@
package model
import "github.com/mattermost/mattermost-server/v5/mlog"
import (
"github.com/mattermost/mattermost-server/v5/mlog"
)
type BundleInfo struct {
Path string

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

@@ -19,6 +19,7 @@ import (
"time"
"github.com/mattermost/ldap"
"github.com/mattermost/mattermost-server/v5/mlog"
)

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

@@ -16,6 +16,7 @@ import (
"strings"
"github.com/disintegration/imaging"
"github.com/mattermost/mattermost-server/v5/mlog"
)

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

@@ -6,13 +6,14 @@ package model
import (
"bytes"
"encoding/base64"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
_ "image/gif"
_ "image/png"
"io/ioutil"
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestFileInfoIsValid(t *testing.T) {

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

@@ -4,9 +4,10 @@
package model
import (
"github.com/stretchr/testify/require"
"strings"
"testing"
"github.com/stretchr/testify/require"
)
func TestInitialLoadJson(t *testing.T) {

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

@@ -11,10 +11,9 @@ import (
"strings"
"testing"
"gopkg.in/yaml.v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"
)
func TestIsValid(t *testing.T) {

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

@@ -5,8 +5,9 @@ package model
import (
"encoding/json"
"github.com/pkg/errors"
"io"
"github.com/pkg/errors"
)
type ProductNotices []ProductNotice

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

@@ -3,7 +3,9 @@
package model
import "net/http"
import (
"net/http"
)
const (
TOKEN_SIZE = 64

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

@@ -18,9 +18,10 @@ import (
"time"
"unicode/utf8"
"github.com/mattermost/mattermost-server/v5/services/timezones"
"golang.org/x/crypto/bcrypt"
"golang.org/x/text/language"
"github.com/mattermost/mattermost-server/v5/services/timezones"
)
const (

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

@@ -4,9 +4,10 @@
package model
import (
"github.com/stretchr/testify/require"
"strings"
"testing"
"github.com/stretchr/testify/require"
)
func TestUserAccessTokenSearchJson(t *testing.T) {