code: func QueryLabels(url *url.URL, name string, p printer) int {
  	config := api.Config{
  		Address: url.String(),
  	}
  
  	// Create new client.
  	c, err := api.NewClient(config)
  	if err != nil {
  		fmt.Fprintln(os.Stderr, "error creating API client:", err)
  		return 1
  	}
  
  	// Run query against client.
  	api := v1.NewAPI(c)
  	ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
  	val, err := api.LabelValues(ctx, name)
  	cancel()
  
  	if err != nil {
  		fmt.Fprintln(os.Stderr, "query error:", err)
  		return 1
  	}
  
  	p.printLabelValues(val)
  	return 0
  }
docs: // QueryLabels queries for label values against a Prometheus server.