Chore: Fix issues reported by staticcheck; enable stylecheck linter (#28866)

* Chore: Fix issues reported by staticcheck

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Apply suggestions from code review

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
Arve Knudsen
2020-11-05 15:37:11 +01:00
committed by GitHub
co-authored by Emil Tullstedt
parent 135b83e17f
commit 676d393ec9
27 changed files with 193 additions and 182 deletions
@@ -23,7 +23,7 @@ type callResourceResponseStream struct {
func (s *callResourceResponseStream) Send(res *backend.CallResourceResponse) error {
if s.closed {
return errors.New("Cannot send to a closed stream")
return errors.New("cannot send to a closed stream")
}
select {
@@ -48,7 +48,7 @@ func (s *callResourceResponseStream) Recv() (*backend.CallResourceResponse, erro
func (s *callResourceResponseStream) Close() error {
if s.closed {
return errors.New("Cannot close a closed stream")
return errors.New("cannot close a closed stream")
}
close(s.stream)