goimports (#16640)
* 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>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0c2c31bb0a
Коммит
e89b26e8f3
@@ -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) {
|
||||
|
||||
Ссылка в новой задаче
Block a user