MM-52532: Fix golangci warnings (#23709)
https://mattermost.atlassian.net/browse/MM-52532 - Replace golint with revive - Add makezero linter - Fix all the required linter failures Some issues in enterprise and public modules are yet to be fixed. We send this to expediate things.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
62a3ee8adc
Коммит
c249ba4a66
@@ -203,7 +203,7 @@ type AnalyticsPostCountsOptions struct {
|
||||
}
|
||||
|
||||
func (o *PostPatch) WithRewrittenImageURLs(f func(string) string) *PostPatch {
|
||||
copy := *o
|
||||
copy := *o //nolint:revive
|
||||
if copy.Message != nil {
|
||||
*copy.Message = RewriteImageURLs(*o.Message, f)
|
||||
}
|
||||
@@ -292,13 +292,13 @@ func (o *Post) ShallowCopy(dst *Post) error {
|
||||
|
||||
// Clone shallowly copies the post and returns the copy.
|
||||
func (o *Post) Clone() *Post {
|
||||
copy := &Post{}
|
||||
copy := &Post{} //nolint:revive
|
||||
o.ShallowCopy(copy)
|
||||
return copy
|
||||
}
|
||||
|
||||
func (o *Post) ToJSON() (string, error) {
|
||||
copy := o.Clone()
|
||||
copy := o.Clone() //nolint:revive
|
||||
copy.StripActionIntegrations()
|
||||
b, err := json.Marshal(copy)
|
||||
return string(b), err
|
||||
|
||||
Ссылка в новой задаче
Block a user