MM-53032: Fix module path after repo rename (#23689)
It was a good decision in hindsight to keep the public module as 0.x because this would have been a breaking change again. https://mattermost.atlassian.net/browse/MM-53032 ```release-note Changed the Go module path from github.com/mattermost/mattermost-server/server/v8 to github.com/mattermost/mattermost/server/v8. For the public facing module, it's path is also changed from github.com/mattermost/mattermost-server/server/public to github.com/mattermost/mattermost/server/public ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a6d1d38b27
Коммит
efaa6264cc
@@ -1,4 +1,4 @@
|
||||
module github.com/mattermost/mattermost-server/server/public
|
||||
module github.com/mattermost/mattermost/server/public
|
||||
|
||||
go 1.19
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
type BundleInfo struct {
|
||||
|
||||
@@ -28,7 +28,7 @@ func TestClient4TrimTrailingSlash(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/mattermost/mattermost-server/server/v8/channels/issues/8205
|
||||
// https://github.com/mattermost/mattermost/server/v8/channels/issues/8205
|
||||
func TestClient4CreatePost(t *testing.T) {
|
||||
post := &Post{
|
||||
Props: map[string]any{
|
||||
|
||||
@@ -275,7 +275,7 @@ type SubscriptionChange struct {
|
||||
// TODO remove BoardsLimits.
|
||||
// It is not used for real.
|
||||
// Focalboard has some lingering code using this struct
|
||||
// https://github.com/mattermost/mattermost-server/server/v8/boards/blob/fd4cf95f8ac9ba616864b25bf91bb1e4ec21335a/server/app/cloud.go#L86
|
||||
// https://github.com/mattermost/mattermost/server/v8/boards/blob/fd4cf95f8ac9ba616864b25bf91bb1e4ec21335a/server/app/cloud.go#L86
|
||||
// we should remove this struct once that code is removed.
|
||||
type BoardsLimits struct {
|
||||
Cards *int `json:"cards"`
|
||||
@@ -298,7 +298,7 @@ type ProductLimits struct {
|
||||
// TODO remove Boards property.
|
||||
// It is not used for real.
|
||||
// Focalboard has some lingering code using this property
|
||||
// https://github.com/mattermost/mattermost-server/server/v8/boards/blob/fd4cf95f8ac9ba616864b25bf91bb1e4ec21335a/server/app/cloud.go#L86
|
||||
// https://github.com/mattermost/mattermost/server/v8/boards/blob/fd4cf95f8ac9ba616864b25bf91bb1e4ec21335a/server/app/cloud.go#L86
|
||||
// we should remove this property once that code is removed.
|
||||
Boards *BoardsLimits `json:"boards,omitempty"`
|
||||
Files *FilesLimits `json:"files,omitempty"`
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/i18n"
|
||||
"github.com/mattermost/mattermost/server/public/shared/i18n"
|
||||
)
|
||||
|
||||
type CommandArgs struct {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/utils"
|
||||
"github.com/mattermost/mattermost/server/public/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -21,8 +21,8 @@ import (
|
||||
|
||||
"github.com/mattermost/ldap"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost-server/server/public/utils"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"sync"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/markdown"
|
||||
"github.com/mattermost/mattermost/server/public/shared/markdown"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -17,8 +17,8 @@ import (
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
"golang.org/x/text/language"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/timezones"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/shared/timezones"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/pborman/uuid"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/i18n"
|
||||
"github.com/mattermost/mattermost/server/public/shared/i18n"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/vmihailenco/msgpack/v5"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/i18n"
|
||||
"github.com/mattermost/mattermost/server/public/shared/i18n"
|
||||
|
||||
"github.com/vmihailenco/msgpack/v5"
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
)
|
||||
|
||||
// The API can be used to retrieve data or perform actions on behalf of the plugin. Most methods
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"net/http"
|
||||
timePkg "time"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
)
|
||||
|
||||
type apiTimerLayer struct {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"go/ast"
|
||||
"go/token"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/plugin/checker/internal/asthelpers"
|
||||
"github.com/mattermost/mattermost-server/server/public/plugin/checker/internal/version"
|
||||
"github.com/mattermost/mattermost/server/public/plugin/checker/internal/asthelpers"
|
||||
"github.com/mattermost/mattermost/server/public/plugin/checker/internal/version"
|
||||
)
|
||||
|
||||
func checkAPIVersionComments(pkgPath string) (result, error) {
|
||||
|
||||
@@ -17,24 +17,24 @@ func TestCheckAPIVersionComments(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "valid comments",
|
||||
pkgPath: "github.com/mattermost/mattermost-server/server/public/plugin/checker/internal/test/valid",
|
||||
pkgPath: "github.com/mattermost/mattermost/server/public/plugin/checker/internal/test/valid",
|
||||
err: "",
|
||||
},
|
||||
{
|
||||
name: "invalid comments",
|
||||
pkgPath: "github.com/mattermost/mattermost-server/server/public/plugin/checker/internal/test/invalid",
|
||||
pkgPath: "github.com/mattermost/mattermost/server/public/plugin/checker/internal/test/invalid",
|
||||
expected: result{
|
||||
Errors: []string{"internal/test/invalid/invalid.go:15:2: missing a minimum server version comment on method InvalidMethod"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "missing API interface",
|
||||
pkgPath: "github.com/mattermost/mattermost-server/server/public/plugin/checker/internal/test/missing",
|
||||
pkgPath: "github.com/mattermost/mattermost/server/public/plugin/checker/internal/test/missing",
|
||||
err: "could not find API interface",
|
||||
},
|
||||
{
|
||||
name: "non-existent package path",
|
||||
pkgPath: "github.com/mattermost/mattermost-server/server/public/plugin/checker/internal/test/does_not_exist",
|
||||
pkgPath: "github.com/mattermost/mattermost/server/public/plugin/checker/internal/test/does_not_exist",
|
||||
err: "could not find API interface",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
const pluginPackagePath = "github.com/mattermost/mattermost-server/server/public/plugin"
|
||||
const pluginPackagePath = "github.com/mattermost/mattermost/server/public/plugin"
|
||||
|
||||
type result struct {
|
||||
Warnings []string
|
||||
|
||||
@@ -24,8 +24,8 @@ import (
|
||||
"github.com/hashicorp/go-plugin"
|
||||
"github.com/lib/pq"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
var hookNameToId map[string]int = make(map[string]int)
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -13,9 +13,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/public/utils"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/utils"
|
||||
)
|
||||
|
||||
var ErrNotFound = errors.New("Item not found")
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
func TestAvailablePlugins(t *testing.T) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/plugin"
|
||||
"github.com/mattermost/mattermost/server/public/plugin"
|
||||
)
|
||||
|
||||
// HelloWorldPlugin implements the interface expected by the Mattermost server to communicate
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/plugin"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/plugin"
|
||||
)
|
||||
|
||||
// configuration represents the configuration for this plugin as exposed via the Mattermost
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/hashicorp/go-hclog"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
type hclogAdapter struct {
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -11,9 +11,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/plugin/utils"
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/plugin/utils"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
func TestPluginHealthCheck(t *testing.T) {
|
||||
@@ -35,7 +35,7 @@ func testPluginHealthCheckSuccess(t *testing.T) {
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/server/public/plugin"
|
||||
"github.com/mattermost/mattermost/server/public/plugin"
|
||||
)
|
||||
|
||||
type MyPlugin struct {
|
||||
@@ -73,8 +73,8 @@ func testPluginHealthCheckPanic(t *testing.T) {
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/plugin"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/plugin"
|
||||
)
|
||||
|
||||
type MyPlugin struct {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
)
|
||||
|
||||
// These assignments are part of the wire protocol used to trigger hook events in plugins.
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"net/http"
|
||||
timePkg "time"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
)
|
||||
|
||||
type hooksTimerLayer struct {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"net/http"
|
||||
"net/rpc"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
type hijackedResponse struct {
|
||||
|
||||
@@ -453,7 +453,7 @@ import (
|
||||
"net/http"
|
||||
timePkg "time"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
)
|
||||
|
||||
type apiTimerLayer struct {
|
||||
@@ -494,7 +494,7 @@ import (
|
||||
"net/http"
|
||||
timePkg "time"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
)
|
||||
|
||||
type hooksTimerLayer struct {
|
||||
@@ -674,7 +674,7 @@ func generatePluginTimerLayer(info *PluginInterfaceInfo) {
|
||||
}
|
||||
|
||||
func getPluginPackageDir() string {
|
||||
dirs, err := goList("github.com/mattermost/mattermost-server/server/public/plugin")
|
||||
dirs, err := goList("github.com/mattermost/mattermost/server/public/plugin")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
} else if len(dirs) != 1 {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
model "github.com/mattermost/mattermost-server/server/public/model"
|
||||
model "github.com/mattermost/mattermost/server/public/model"
|
||||
)
|
||||
|
||||
// API is an autogenerated mock type for the API type
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
// https://godoc.org/github.com/stretchr/testify/mock
|
||||
//
|
||||
// If you need to import the mock package, you can import it with
|
||||
// "github.com/mattermost/mattermost-server/server/public/plugin/plugintest/mock".
|
||||
// "github.com/mattermost/mattermost/server/public/plugin/plugintest/mock".
|
||||
package plugintest
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
plugin "github.com/mattermost/mattermost-server/server/public/plugin"
|
||||
plugin "github.com/mattermost/mattermost/server/public/plugin"
|
||||
)
|
||||
|
||||
// Driver is an autogenerated mock type for the Driver type
|
||||
|
||||
@@ -13,9 +13,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/plugin"
|
||||
"github.com/mattermost/mattermost-server/server/public/plugin/plugintest"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/plugin"
|
||||
"github.com/mattermost/mattermost/server/public/plugin/plugintest"
|
||||
)
|
||||
|
||||
type HelloUserPlugin struct {
|
||||
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
model "github.com/mattermost/mattermost-server/server/public/model"
|
||||
model "github.com/mattermost/mattermost/server/public/model"
|
||||
|
||||
plugin "github.com/mattermost/mattermost-server/server/public/plugin"
|
||||
plugin "github.com/mattermost/mattermost/server/public/plugin"
|
||||
)
|
||||
|
||||
// Hooks is an autogenerated mock type for the Hooks type
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"io"
|
||||
"reflect"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
)
|
||||
|
||||
type OnConfigurationChangeIFace interface {
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
"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/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
type supervisor struct {
|
||||
|
||||
@@ -11,9 +11,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/plugin/utils"
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/plugin/utils"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
func TestSupervisor(t *testing.T) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/mattermost/go-i18n/i18n"
|
||||
"github.com/mattermost/go-i18n/i18n/bundle"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
const defaultLocale = "en"
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
func TestLoggingBeforeInitialized(t *testing.T) {
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/utils"
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/utils"
|
||||
)
|
||||
|
||||
func TestHumanizeJsonError(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user