// Value returns the current value of the counter for the given key.
1603
func (c *SafeCounter) Value(key string) int {
	c.mux.Lock()
	// Lock so only one goroutine at a time can access the map c.v.
	defer c.mux.Unlock()
	return c.v[key]
}
509530
func (ctx *Context) Value(key interface{}) (val interface{}) {
	if key == isRecursive {
		return isRecursive
	}
	return ctx._ctx.Value(key)
}
165318
func (w *OrderedValue) Value() interface{} {
	w.lock.Lock()

	// If we have a pending value already, use it
	if w.values != nil && w.values.Len() > 0 {
		front := w.values.Front()
		w.values.Remove(front)
		w.lock.Unlock()
		return front.Value
	}

	// No pending value, create a waiter
	if w.waiters == nil {
		w.waiters = list.New()
	}

	var val Value
	w.waiters.PushBack(&val)
	w.lock.Unlock()

	// Return the value once we have it
	return val.Value()
}
721587
func (a Axis) Value() float32 {
	for _, pair := range a.Pairs {
		v := pair.Value()
		if v != AxisNeutral {
			return v
		}
	}

	return AxisNeutral
}
577848
func (ctx *httpRequestContext) Value(key interface{}) interface{} {
	if keyStr, ok := key.(string); ok {
		if keyStr == "http.request" {
			return ctx.r
		}

		if !strings.HasPrefix(keyStr, "http.request.") {
			goto fallback
		}

		parts := strings.Split(keyStr, ".")

		if len(parts) != 3 {
			goto fallback
		}

		switch parts[2] {
		case "uri":
			return ctx.r.RequestURI
		case "remoteaddr":
			return RemoteAddr(ctx.r)
		case "method":
			return ctx.r.Method
		case "host":
			return ctx.r.Host
		case "referer":
			referer := ctx.r.Referer()
			if referer != "" {
				return referer
			}
		case "useragent":
			return ctx.r.UserAgent()
		case "id":
			return ctx.id
		case "startedat":
			return ctx.startedAt
		case "contenttype":
			ct := ctx.r.Header.Get("Content-Type")
			if ct != "" {
				return ct
			}
		}
	}

fallback:
	return ctx.Context.Value(key)
}
113176
func (c *cursor) Value() []byte {
	// Ensure transaction state is valid.
	if err := c.bucket.tx.checkClosed(); err != nil {
		return nil
	}

	// Nothing to return if cursor is exhausted.
	if c.currentIter == nil {
		return nil
	}

	// Return nil for the value when the cursor is pointing to a nested
	// bucket.
	if bytes.HasPrefix(c.currentIter.Key(), bucketIndexPrefix) {
		return nil
	}

	return copySlice(c.currentIter.Value())
}
207608
func (d *decodeState) value(v reflect.Value) {
	if !v.IsValid() {
		d.next()
		return
	}
	switch op := d.peekState(); op {
	default:
		d.error(errPhase)

	case scanBeginArray:
		d.array(v)

	case scanBeginObject:
		d.object(v)

	case scanBeginLiteral:
		d.literal(v)
	}
}
780384
func (i *blockIter) Value() []byte {
	if i.soi {
		return nil
	}
	return i.val[:len(i.val):len(i.val)]
}
576478
func (r *RawConfig) Value() interface{} {
	if c := r.Config(); c != nil {
		if v, ok := c[r.Key]; ok {
			return v
		}
	}

	r.lock.Lock()
	defer r.lock.Unlock()
	return r.Raw[r.Key]
}
223776
func (it *Iterator) Value() []byte {
	v := it.it.Value()
	if v == nil {
		return nil
	}

	return append([]byte{}, v...)
}
1302850
func (c *Counter) Value() float64 {
	return math.Float64frombits(atomic.LoadUint64(&c.bits))
}
975996
func (it *iterator) Value() []byte {
	if len(it.values) > 0 {
		return it.values[0]
	}
	return nil
}
702527
func (b *Bar) Value(n float64) {
	if n > b.Total {
		panic("Bar update value cannot be greater than the total")
	}
	b.value = n
}
819214
func (iter *Iterator) Value() Entry {
	if iter.n == nil {
		return nil
	}

	return iter.n.entry
}
528279
func (n nowSentinel) Value() (driver.Value, error) {
	now := time.Now().UTC().Format(timeFormat)
	return now, nil
}
342479
func (s *SortField) Value(i *DocumentMatch) string {
	iTerms := s.filterTermsByType(s.values)
	iTerm := s.filterTermsByMode(iTerms)
	s.values = s.values[:0]
	return iTerm
}
808232
func (e *Expect) Value(value interface{}) *Value {
	return NewValue(e.config.Reporter, value)
}