Skip to content

Commit

Permalink
remove duplicate var define (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkerou authored and rghetia committed Jul 1, 2019
1 parent 6d798e3 commit c0a5fd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 8 additions & 8 deletions api/trace/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ import (
)

type Tracer interface {
// ScopeID returns the resource scope of this tracer.
scope.Scope

Start(context.Context, string, ...SpanOption) (context.Context, Span)

// WithSpan wraps the execution of the function body with a span.
Expand All @@ -50,9 +53,6 @@ type Tracer interface {

// Note: see https://github.com/opentracing/opentracing-go/issues/127
Inject(context.Context, Span, Injector)

// ScopeID returns the resource scope of this tracer.
scope.Scope
}

type Span interface {
Expand Down Expand Up @@ -111,6 +111,11 @@ type Reference struct {

type RelationshipType int

const (
ChildOfRelationship RelationshipType = iota
FollowsFromRelationship
)

var (
// The process global tracer could have process-wide resource
// tags applied directly, or we can have a SetGlobal tracer to
Expand All @@ -121,11 +126,6 @@ var (
nt = &noopTracer{}
)

const (
ChildOfRelationship RelationshipType = iota
FollowsFromRelationship
)

// GlobalTracer return tracer registered with global registry.
// If no tracer is registered then an instance of noop Tracer is returned.
func GlobalTracer() Tracer {
Expand Down
2 changes: 0 additions & 2 deletions api/trace/noop_trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ type noopTracer struct {

var _ Tracer = (*noopTracer)(nil)

var t = &noopTracer{}

// ScopeID returns an empty instance of ScopeID
func (t *noopTracer) ScopeID() core.ScopeID {
return t.resources.Scope()
Expand Down

0 comments on commit c0a5fd1

Please sign in to comment.