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
```
Этот коммит содержится в:
Agniva De Sarker
2023-06-11 10:54:35 +05:30
коммит произвёл GitHub
родитель a6d1d38b27
Коммит efaa6264cc
1425 изменённых файлов: 3864 добавлений и 3864 удалений

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

@@ -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) {