mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-18 21:09:38 +00:00
Fix lint warnings in Go code
All cosmetic.
This commit is contained in:
@@ -166,7 +166,7 @@ type websocketState struct {
|
||||
}
|
||||
|
||||
func (wc *websocketState) update(ctx context.Context) error {
|
||||
span := ot.StartSpan("websocket.Render", ot.Tag{"topology", wc.topologyID})
|
||||
span := ot.StartSpan("websocket.Render", ot.Tag{Key: "topology", Value: wc.topologyID})
|
||||
defer span.Finish()
|
||||
ctx = ot.ContextWithSpan(ctx, span)
|
||||
// We measure how much time has passed since the channel was opened
|
||||
|
||||
@@ -61,7 +61,7 @@ type consulClient struct {
|
||||
|
||||
// Get and deserialise a JSON value from consul.
|
||||
func (c *consulClient) Get(ctx context.Context, key string, out interface{}) error {
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "Consul Get", opentracing.Tag{"key", key})
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "Consul Get", opentracing.Tag{Key: "key", Value: key})
|
||||
defer span.Finish()
|
||||
kvp, _, err := c.kv.Get(key, queryOptions)
|
||||
if err != nil {
|
||||
@@ -76,7 +76,7 @@ func (c *consulClient) Get(ctx context.Context, key string, out interface{}) err
|
||||
// CAS atomically modify a value in a callback.
|
||||
// If value doesn't exist you'll get nil as a argument to your callback.
|
||||
func (c *consulClient) CAS(ctx context.Context, key string, out interface{}, f CASCallback) error {
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "Consul CAS", opentracing.Tag{"key", key})
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "Consul CAS", opentracing.Tag{Key: "key", Value: key})
|
||||
defer span.Finish()
|
||||
var (
|
||||
index = uint64(0)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/gorilla/websocket"
|
||||
opentracing "github.com/opentracing/opentracing-go"
|
||||
@@ -289,7 +290,7 @@ func (pr *consulPipeRouter) Get(ctx context.Context, id string, e app.End) (xfer
|
||||
}
|
||||
key := fmt.Sprintf("%s%s-%s", pr.prefix, userID, id)
|
||||
log.Infof("Get %s:%s", key, e)
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PipeRouter Get", opentracing.Tag{"key", key})
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PipeRouter Get", opentracing.Tag{Key: "key", Value: key})
|
||||
defer span.Finish()
|
||||
|
||||
// Try to ensure the given end of the given pipe
|
||||
@@ -333,7 +334,7 @@ func (pr *consulPipeRouter) Release(ctx context.Context, id string, e app.End) e
|
||||
}
|
||||
key := fmt.Sprintf("%s%s-%s", pr.prefix, userID, id)
|
||||
log.Infof("Release %s:%s", key, e)
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PipeRouter Release", opentracing.Tag{"key", key})
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PipeRouter Release", opentracing.Tag{Key: "key", Value: key})
|
||||
defer span.Finish()
|
||||
|
||||
// atomically clear my end of the pipe in consul
|
||||
@@ -360,7 +361,7 @@ func (pr *consulPipeRouter) Delete(ctx context.Context, id string) error {
|
||||
}
|
||||
key := fmt.Sprintf("%s%s-%s", pr.prefix, userID, id)
|
||||
log.Infof("Delete %s", key)
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PipeRouter Delete", opentracing.Tag{"key", key})
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PipeRouter Delete", opentracing.Tag{Key: "key", Value: key})
|
||||
defer span.Finish()
|
||||
|
||||
return pr.client.CAS(ctx, key, &consulPipe{}, func(in interface{}) (interface{}, bool, error) {
|
||||
|
||||
@@ -399,7 +399,6 @@ func (c *container) controls() []string {
|
||||
default:
|
||||
return []string{StartContainer, RemoveContainer}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *container) GetNode() report.Node {
|
||||
|
||||
@@ -373,6 +373,7 @@ func (t *EbpfTracker) isDead() bool {
|
||||
return t.dead
|
||||
}
|
||||
|
||||
// Stop the tracker and wait for it to signal it has stopped
|
||||
func (t *EbpfTracker) Stop() {
|
||||
t.stop()
|
||||
if t.stopping != nil {
|
||||
|
||||
Reference in New Issue
Block a user