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

4
services/cache/lru.go поставляемый
Просмотреть файл

@@ -8,10 +8,10 @@ import (
"sync"
"time"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/tinylib/msgp/msgp"
"github.com/vmihailenco/msgpack/v5"
"github.com/mattermost/mattermost-server/v5/model"
)
// LRU is a thread-safe fixed size LRU cache.

4
services/cache/lru_striped_bench_test.go поставляемый
Просмотреть файл

@@ -9,9 +9,9 @@ import (
"sync"
"testing"
"github.com/mattermost/mattermost-server/v5/services/cache"
"github.com/cespare/xxhash/v2"
"github.com/mattermost/mattermost-server/v5/services/cache"
)
const (

4
services/cache/lru_striped_test.go поставляемый
Просмотреть файл

@@ -8,11 +8,11 @@ import (
"hash/maphash"
"testing"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/cespare/xxhash/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v5/model"
)
func makeLRUPredictibleTestData(num int) [][2]string {

3
services/cache/lru_test.go поставляемый
Просмотреть файл

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

3
services/cache/mocks/Provider.go поставляемый
Просмотреть файл

@@ -3,8 +3,9 @@
package mocks
import (
cache "github.com/mattermost/mattermost-server/v5/services/cache"
mock "github.com/stretchr/testify/mock"
cache "github.com/mattermost/mattermost-server/v5/services/cache"
)
// Provider is an autogenerated mock type for the Provider type

4
services/cache/provider.go поставляемый
Просмотреть файл

@@ -3,7 +3,9 @@
package cache
import "time"
import (
"time"
)
// CacheOptions contains options for initializaing a cache
type CacheOptions struct {