func (v *GaugeVec) GetMetricWith(labels Labels) (Gauge, error) {
	metric, err := v.MetricVec.GetMetricWith(labels)
	if metric != nil {
		return metric.(Gauge), err
	}
	return nil, err
}
GetMetricWith returns the Gauge for the given Labels map (the label names
must match those of the variable labels in Desc). If that label map is
accessed for the first time, a new Gauge is created. Implications of
creating a Gauge without using it and keeping the Gauge for later use are
the same as for GetMetricWithLabelValues.

An error is returned if the number and names of the Labels are inconsistent
with those of the variable labels in Desc (minus any curried labels).

This method is used for the same purpose as
GetMetricWithLabelValues(...string). See there for pros and cons of the two
methods.
package prometheus
import (
	"math"
	"sync/atomic"
	"time"
	dto "github.com/prometheus/client_model/go"
)
type Gauge interface {
	Metric
	Collector
	Set(float64)
	Inc()
	Dec()
	Add(float64)
	Sub(float64)
	SetToCurrentTime()
}
type GaugeOpts Opts
func NewGauge(opts GaugeOpts) Gauge {
	desc := NewDesc(
		BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
		opts.Help,
		nil,
		opts.ConstLabels,
	)
	result := &gauge{desc: desc, labelPairs: desc.constLabelPairs}
	result.init(result)  
	return result
}
type gauge struct {
	valBits uint64
	selfCollector
	desc       *Desc
	labelPairs []*dto.LabelPair
}
func (g *gauge) Desc() *Desc {
	return g.desc
}
func (g *gauge) Set(val float64) {
	atomic.StoreUint64(&g.valBits, math.Float64bits(val))
}
func (g *gauge) SetToCurrentTime() {
	g.Set(float64(time.Now().UnixNano()) / 1e9)
}
func (g *gauge) Inc() {
	g.Add(1)
}
func (g *gauge) Dec() {
	g.Add(-1)
}
func (g *gauge) Add(val float64) {
	for {
		oldBits := atomic.LoadUint64(&g.valBits)
		newBits := math.Float64bits(math.Float64frombits(oldBits) + val)
		if atomic.CompareAndSwapUint64(&g.valBits, oldBits, newBits) {
			return
		}
	}
}
func (g *gauge) Sub(val float64) {
	g.Add(val * -1)
}
func (g *gauge) Write(out *dto.Metric) error {
	val := math.Float64frombits(atomic.LoadUint64(&g.valBits))
	return populateMetric(GaugeValue, val, g.labelPairs, nil, out)
}
type GaugeVec struct {
	*MetricVec
}
func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec {
	desc := NewDesc(
		BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
		opts.Help,
		labelNames,
		opts.ConstLabels,
	)
	return &GaugeVec{
		MetricVec: NewMetricVec(desc, func(lvs ...string) Metric {
			if len(lvs) != len(desc.variableLabels) {
				panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels, lvs))
			}
			result := &gauge{desc: desc, labelPairs: MakeLabelPairs(desc, lvs)}
			result.init(result)  
			return result
		}),
	}
}
func (v *GaugeVec) GetMetricWithLabelValues(lvs ...string) (Gauge, error) {
	metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...)
	if metric != nil {
		return metric.(Gauge), err
	}
	return nil, err
}