Add whitespace linter (#24855)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
176370e175
Коммит
0d5a8b8841
@@ -15,7 +15,6 @@ import (
|
||||
)
|
||||
|
||||
func ValidateSchemeImportData(data *SchemeImportData) *model.AppError {
|
||||
|
||||
if data.Scope == nil {
|
||||
return model.NewAppError("BulkImport", "app.import.validate_scheme_import_data.null_scope.error", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
@@ -85,7 +84,6 @@ func ValidateSchemeImportData(data *SchemeImportData) *model.AppError {
|
||||
}
|
||||
|
||||
func ValidateRoleImportData(data *RoleImportData) *model.AppError {
|
||||
|
||||
if data.Name == nil || !model.IsValidRoleName(*data.Name) {
|
||||
return model.NewAppError("BulkImport", "app.import.validate_role_import_data.name_invalid.error", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
@@ -118,7 +116,6 @@ func ValidateRoleImportData(data *RoleImportData) *model.AppError {
|
||||
}
|
||||
|
||||
func ValidateTeamImportData(data *TeamImportData) *model.AppError {
|
||||
|
||||
if data.Name == nil {
|
||||
return model.NewAppError("BulkImport", "app.import.validate_team_import_data.name_missing.error", nil, "", http.StatusBadRequest)
|
||||
} else if len(*data.Name) > model.TeamNameMaxLength {
|
||||
@@ -153,7 +150,6 @@ func ValidateTeamImportData(data *TeamImportData) *model.AppError {
|
||||
}
|
||||
|
||||
func ValidateChannelImportData(data *ChannelImportData) *model.AppError {
|
||||
|
||||
if data.Team == nil {
|
||||
return model.NewAppError("BulkImport", "app.import.validate_channel_import_data.team_missing.error", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
@@ -257,7 +257,6 @@ func TestImportValidateRoleImportData(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImportValidateTeamImportData(t *testing.T) {
|
||||
|
||||
// Test with minimum required valid properties.
|
||||
data := TeamImportData{
|
||||
Name: ptrStr("teamname"),
|
||||
@@ -355,7 +354,6 @@ func TestImportValidateTeamImportData(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImportValidateChannelImportData(t *testing.T) {
|
||||
|
||||
// Test with minimum required valid properties.
|
||||
chanTypeOpen := model.ChannelTypeOpen
|
||||
data := ChannelImportData{
|
||||
@@ -469,7 +467,6 @@ func TestImportValidateChannelImportData(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImportValidateUserImportData(t *testing.T) {
|
||||
|
||||
// Test with minimum required valid properties.
|
||||
data := UserImportData{
|
||||
Username: ptrStr("bob"),
|
||||
@@ -671,11 +668,9 @@ func TestImportValidateUserAuth(t *testing.T) {
|
||||
require.NotNil(t, err, fmt.Sprintf("authService: %v, authData: %v", test.authService, test.authData))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestImportValidateUserTeamsImportData(t *testing.T) {
|
||||
|
||||
// Invalid Name.
|
||||
data := []UserTeamImportData{
|
||||
{
|
||||
@@ -721,7 +716,6 @@ func TestImportValidateUserTeamsImportData(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImportValidateUserChannelsImportData(t *testing.T) {
|
||||
|
||||
// Invalid Name.
|
||||
data := []UserChannelImportData{
|
||||
{
|
||||
@@ -1027,7 +1021,6 @@ func TestImportValidatePostImportData(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImportValidateDirectChannelImportData(t *testing.T) {
|
||||
|
||||
// Test with valid number of members for direct message.
|
||||
data := DirectChannelImportData{
|
||||
Members: &[]string{
|
||||
|
||||
Ссылка в новой задаче
Block a user