code: func NewCounterFunc(opts CounterOpts, function func() float64) CounterFunc {
  	return newValueFunc(NewDesc(
  		BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
  		opts.Help,
  		nil,
  		opts.ConstLabels,
  	), CounterValue, function)
  }
docs: // NewCounterFunc creates a new CounterFunc based on the provided
  // CounterOpts. The value reported is determined by calling the given function
  // from within the Write method. Take into account that metric collection may
  // happen concurrently. If that results in concurrent calls to Write, like in
  // the case where a CounterFunc is directly registered with Prometheus, the
  // provided function must be concurrency-safe. The function should also honor
  // the contract for a Counter (values only go up, not down), but compliance will
  // not be checked.