Fix issues found by golangci v1.22.2 (#13568)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2d9e85e82a
Коммит
6e9e849871
@@ -549,7 +549,6 @@ func (s *TimerLayerChannelStore) ClearCaches() {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.ClearCaches", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) CountPostsAfter(channelId string, timestamp int64, userId string) (int, *model.AppError) {
|
||||
@@ -1237,7 +1236,6 @@ func (s *TimerLayerChannelStore) InvalidateAllChannelMembersForUser(userId strin
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateAllChannelMembersForUser", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) InvalidateCacheForChannelMembersNotifyProps(channelId string) {
|
||||
@@ -1253,7 +1251,6 @@ func (s *TimerLayerChannelStore) InvalidateCacheForChannelMembersNotifyProps(cha
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateCacheForChannelMembersNotifyProps", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) InvalidateChannel(id string) {
|
||||
@@ -1269,7 +1266,6 @@ func (s *TimerLayerChannelStore) InvalidateChannel(id string) {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateChannel", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) InvalidateChannelByName(teamId string, name string) {
|
||||
@@ -1285,7 +1281,6 @@ func (s *TimerLayerChannelStore) InvalidateChannelByName(teamId string, name str
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateChannelByName", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) InvalidateGuestCount(channelId string) {
|
||||
@@ -1301,7 +1296,6 @@ func (s *TimerLayerChannelStore) InvalidateGuestCount(channelId string) {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateGuestCount", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) InvalidateMemberCount(channelId string) {
|
||||
@@ -1317,7 +1311,6 @@ func (s *TimerLayerChannelStore) InvalidateMemberCount(channelId string) {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateMemberCount", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) InvalidatePinnedPostCount(channelId string) {
|
||||
@@ -1333,7 +1326,6 @@ func (s *TimerLayerChannelStore) InvalidatePinnedPostCount(channelId string) {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidatePinnedPostCount", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) IsUserInChannelUseCache(userId string, channelId string) bool {
|
||||
@@ -2085,7 +2077,6 @@ func (s *TimerLayerCommandWebhookStore) Cleanup() {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("CommandWebhookStore.Cleanup", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerCommandWebhookStore) Get(id string) (*model.CommandWebhook, *model.AppError) {
|
||||
@@ -2373,7 +2364,6 @@ func (s *TimerLayerFileInfoStore) ClearCaches() {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.ClearCaches", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerFileInfoStore) DeleteForPost(postId string) (string, *model.AppError) {
|
||||
@@ -2469,7 +2459,6 @@ func (s *TimerLayerFileInfoStore) InvalidateFileInfosForPostCache(postId string)
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.InvalidateFileInfosForPostCache", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerFileInfoStore) PermanentDelete(fileId string) *model.AppError {
|
||||
@@ -3861,7 +3850,6 @@ func (s *TimerLayerPostStore) ClearCaches() {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("PostStore.ClearCaches", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerPostStore) Delete(postId string, time int64, deleteByID string) *model.AppError {
|
||||
@@ -4229,7 +4217,6 @@ func (s *TimerLayerPostStore) InvalidateLastPostTimeCache(channelId string) {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("PostStore.InvalidateLastPostTimeCache", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerPostStore) Overwrite(post *model.Post) (*model.Post, *model.AppError) {
|
||||
@@ -4821,7 +4808,6 @@ func (s *TimerLayerSessionStore) Cleanup(expiryTime int64, batchSize int64) {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.Cleanup", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerSessionStore) Get(sessionIdOrToken string) (*model.Session, *model.AppError) {
|
||||
@@ -5285,7 +5271,6 @@ func (s *TimerLayerTeamStore) ClearCaches() {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.ClearCaches", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerTeamStore) Get(id string) (*model.Team, *model.AppError) {
|
||||
@@ -5685,7 +5670,6 @@ func (s *TimerLayerTeamStore) InvalidateAllTeamIdsForUser(userId string) {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.InvalidateAllTeamIdsForUser", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerTeamStore) MigrateTeamMembers(fromTeamId string, fromUserId string) (map[string]string, *model.AppError) {
|
||||
@@ -6021,7 +6005,6 @@ func (s *TimerLayerTokenStore) Cleanup() {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("TokenStore.Cleanup", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerTokenStore) Delete(token string) *model.AppError {
|
||||
@@ -6165,7 +6148,6 @@ func (s *TimerLayerUserStore) ClearCaches() {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("UserStore.ClearCaches", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerUserStore) Count(options model.UserCountOptions) (int64, *model.AppError) {
|
||||
@@ -6741,7 +6723,6 @@ func (s *TimerLayerUserStore) InvalidateProfileCacheForUser(userId string) {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("UserStore.InvalidateProfileCacheForUser", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerUserStore) InvalidateProfilesInChannelCache(channelId string) {
|
||||
@@ -6757,7 +6738,6 @@ func (s *TimerLayerUserStore) InvalidateProfilesInChannelCache(channelId string)
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("UserStore.InvalidateProfilesInChannelCache", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerUserStore) InvalidateProfilesInChannelCacheByUser(userId string) {
|
||||
@@ -6773,7 +6753,6 @@ func (s *TimerLayerUserStore) InvalidateProfilesInChannelCacheByUser(userId stri
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("UserStore.InvalidateProfilesInChannelCacheByUser", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerUserStore) PermanentDelete(userId string) *model.AppError {
|
||||
@@ -7317,7 +7296,6 @@ func (s *TimerLayerWebhookStore) ClearCaches() {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.ClearCaches", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerWebhookStore) DeleteIncoming(webhookId string, time int64) *model.AppError {
|
||||
@@ -7573,7 +7551,6 @@ func (s *TimerLayerWebhookStore) InvalidateWebhookCache(webhook string) {
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.InvalidateWebhookCache", success, elapsed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (s *TimerLayerWebhookStore) PermanentDeleteIncomingByChannel(channelId string) *model.AppError {
|
||||
|
||||
Ссылка в новой задаче
Block a user