[MM-20723] Add golint for plugin package to golangci (#13090)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d12bf77f53
Коммит
5122b9e292
@@ -23,8 +23,8 @@ type HelloUserPlugin struct {
|
||||
}
|
||||
|
||||
func (p *HelloUserPlugin) ServeHTTP(context *plugin.Context, w http.ResponseWriter, r *http.Request) {
|
||||
userId := r.Header.Get("Mattermost-User-Id")
|
||||
user, err := p.API.GetUser(userId)
|
||||
userID := r.Header.Get("Mattermost-User-Id")
|
||||
user, err := p.API.GetUser(userID)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
p.API.LogError(err.Error())
|
||||
|
||||
Ссылка в новой задаче
Block a user