Expose public/ API as submodule (#23345)

* model -> public/model

* plugin -> public/plugin

* public/model/utils -> public/utils

* platform/shared/mlog -> public/shared/mlog

* platform/shared/i18n -> public/shared/i18n

* platform/shared/markdown -> public/shared/markdown

* platform/services/timezones -> public/shared/timezones

* channels/einterfaces -> einterfaces

* expose public/ submodule

* go mod tidy

* .github: cache-dependency-path, setup-go-work

* modules-tidy for public/ too

* remove old gomodtidy
Этот коммит содержится в:
Jesse Hallam
2023-05-10 13:07:02 -03:00
коммит произвёл GitHub
родитель 070ee26081
Коммит bb02b35048
1378 изменённых файлов: 2270 добавлений и 1868 удалений

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

@@ -14,8 +14,8 @@ import (
"path"
"strings"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/i18n"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/i18n"
)
func CheckOrigin(r *http.Request, allowedOrigins string) bool {

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

@@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
func TestRenderWebError(t *testing.T) {

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

@@ -8,8 +8,8 @@ import (
"os"
"path/filepath"
"github.com/mattermost/mattermost-server/server/public/shared/i18n"
"github.com/mattermost/mattermost-server/server/v8/channels/utils/fileutils"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/i18n"
)
// this functions loads translations from filesystem if they are not

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

@@ -17,9 +17,9 @@ import (
"path/filepath"
"strconv"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/channels/utils/fileutils"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
var LicenseValidator LicenseValidatorIface

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

@@ -5,7 +5,7 @@
package mocks
import (
model "github.com/mattermost/mattermost-server/server/v8/model"
model "github.com/mattermost/mattermost-server/server/public/model"
mock "github.com/stretchr/testify/mock"
)

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

@@ -16,9 +16,9 @@ import (
"github.com/pkg/errors"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/channels/utils/fileutils"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
// getSubpathScript renders the inline script that defines window.publicPath to change how webpack loads assets.

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

@@ -12,8 +12,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/v8/channels/utils"
"github.com/mattermost/mattermost-server/server/v8/model"
)
func TestUpdateAssetsSubpathFromConfig(t *testing.T) {

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

@@ -6,7 +6,7 @@ package testutils
import (
"crypto/ecdsa"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
type StaticConfigService struct {

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

@@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
func StringInSlice(a string, slice []string) bool {