From c0a5fd12a5f3e0c3d6aec189092db352a6933ca0 Mon Sep 17 00:00:00 2001
From: thinkerou <thinkerou@gmail.com>
Date: Tue, 2 Jul 2019 02:25:40 +0800
Subject: [PATCH] remove duplicate var define (#34)

---
 api/trace/api.go        | 16 ++++++++--------
 api/trace/noop_trace.go |  2 --
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/api/trace/api.go b/api/trace/api.go
index d697239f4878..b6a470c14349 100644
--- a/api/trace/api.go
+++ b/api/trace/api.go
@@ -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.
@@ -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 {
@@ -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
@@ -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 {
diff --git a/api/trace/noop_trace.go b/api/trace/noop_trace.go
index 36711f195973..7804342d6519 100644
--- a/api/trace/noop_trace.go
+++ b/api/trace/noop_trace.go
@@ -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()