mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
move go vet out of scripts and fixing warning (#12552)
This commit is contained in:
committed by
Torkel Ödegaard
parent
25bcdbcab1
commit
8b32dc5847
@@ -88,6 +88,9 @@ jobs:
|
||||
- run:
|
||||
name: run linters
|
||||
command: 'gometalinter.v2 --enable-gc --vendor --deadline 10m --disable-all --enable=deadcode --enable=ineffassign --enable=structcheck --enable=unconvert --enable=varcheck ./...'
|
||||
- run:
|
||||
name: run go vet
|
||||
command: 'go vet ./pkg/...'
|
||||
|
||||
test-frontend:
|
||||
docker:
|
||||
|
||||
@@ -98,8 +98,6 @@ func (ns *NotificationService) Run(ctx context.Context) error {
|
||||
return ctx.Err()
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ns *NotificationService) SendWebhookSync(ctx context.Context, cmd *m.SendWebhookSync) error {
|
||||
|
||||
@@ -58,7 +58,9 @@ func (rs *RenderingService) renderViaPhantomJS(ctx context.Context, opts Opts) (
|
||||
cmdArgs = append([]string{fmt.Sprintf("--output-encoding=%s", opts.Encoding)}, cmdArgs...)
|
||||
}
|
||||
|
||||
commandCtx, _ := context.WithTimeout(ctx, opts.Timeout+time.Second*2)
|
||||
commandCtx, cancel := context.WithTimeout(ctx, opts.Timeout+time.Second*2)
|
||||
defer cancel()
|
||||
|
||||
cmd := exec.CommandContext(commandCtx, binPath, cmdArgs...)
|
||||
cmd.Stderr = cmd.Stdout
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ func (c *baseClientImpl) ExecuteMultisearch(r *MultiSearchRequest) (*MultiSearch
|
||||
elapsed := time.Now().Sub(start)
|
||||
clientLog.Debug("Decoded multisearch json response", "took", elapsed)
|
||||
|
||||
msr.status = res.StatusCode
|
||||
msr.Status = res.StatusCode
|
||||
|
||||
return &msr, nil
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ type MultiSearchRequest struct {
|
||||
|
||||
// MultiSearchResponse represents a multi search response
|
||||
type MultiSearchResponse struct {
|
||||
status int `json:"status,omitempty"`
|
||||
Status int `json:"status,omitempty"`
|
||||
Responses []*SearchResponse `json:"responses"`
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,6 @@ function exit_if_fail {
|
||||
echo "running go fmt"
|
||||
exit_if_fail test -z "$(gofmt -s -l ./pkg | tee /dev/stderr)"
|
||||
|
||||
echo "running go vet"
|
||||
exit_if_fail test -z "$(go vet ./pkg/... | tee /dev/stderr)"
|
||||
|
||||
echo "building backend with install to cache pkgs"
|
||||
exit_if_fail time go install ./pkg/cmd/grafana-server
|
||||
|
||||
|
||||
Reference in New Issue
Block a user