mocktracer/mockspan.go
func (s *MockSpan) SetTag(key string, value interface{}) opentracing.Span {
	s.Lock()
	defer s.Unlock()
	if key == string(ext.SamplingPriority) {
		if v, ok := value.(uint16); ok {
			s.SpanContext.Sampled = v > 0
			return s
		}
		if v, ok := value.(int); ok {
			s.SpanContext.Sampled = v > 0
			return s
		}
	}
	s.tags[key] = value
	return s
}
func (s *MockSpan) SetTag(key string, value interface{}) opentracing.Span {
	s.Lock()
	defer s.Unlock()
	if key == string(ext.SamplingPriority) {
		if v, ok := value.(uint16); ok {
			s.SpanContext.Sampled = v > 0
			return s
		}
		if v, ok := value.(int); ok {
			s.SpanContext.Sampled = v > 0
			return s
		}
	}
	s.tags[key] = value
	return s
}
func ( s * MockSpan ) SetTag ( key string , value interface { } ) opentracing . Span { s . Lock ( ) defer s . Unlock ( ) if key == string ( ext . SamplingPriority ) { if v , ok := value . ( uint16 ) ; ok { s . SpanContext . Sampled = v > 0 return s } if v , ok := value . ( int ) ; ok { s . SpanContext . Sampled = v > 0 return s } } s . tags [ key ] = value return s }
// SetTag belongs to the Span interface
SetTag belongs to the Span interface