[MM-61302] Use model.NewPointer throughout the code base (#28957)

Этот коммит содержится в:
Ben Schumacher
2024-10-29 13:29:53 +01:00
коммит произвёл GitHub
родитель 97c7c25820
Коммит 2424358b7d
10 изменённых файлов: 804 добавлений и 849 удалений

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

@@ -23,22 +23,6 @@ import (
"github.com/mattermost/mattermost/server/v8/channels/utils/fileutils"
)
func ptrStr(s string) *string {
return &s
}
func ptrInt64(i int64) *int64 {
return &i
}
func ptrInt(i int) *int {
return &i
}
func ptrBool(b bool) *bool {
return &b
}
func checkPreference(t *testing.T, a *App, userID string, category string, name string, value string) {
preferences, err := a.Srv().Store().Preference().GetCategory(userID, category)
require.NoErrorf(t, err, "Failed to get preferences for user %v with category %v", userID, category)
@@ -250,7 +234,7 @@ func TestImportBulkImport(t *testing.T) {
func TestImportProcessImportDataFileVersionLine(t *testing.T) {
data := imports.LineImportData{
Type: "version",
Version: ptrInt(1),
Version: model.NewPointer(1),
}
version, err := processImportDataFileVersionLine(data)
require.Nil(t, err, "Expected no error")