func stringToColumnUsage(s string) (ColumnUsage, error) {
	var u ColumnUsage
	var err error
	switch s {
	case "DISCARD":
		u = DISCARD
	case "LABEL":
		u = LABEL
	case "COUNTER":
		u = COUNTER
	case "GAUGE":
		u = GAUGE
	case "HISTOGRAM":
		u = HISTOGRAM
	case "MAPPEDMETRIC":
		u = MAPPEDMETRIC
	case "DURATION":
		u = DURATION
	default:
		err = fmt.Errorf("wrong ColumnUsage given : %s", s)
	}
	return u, err
}
convert a string to the corresponding ColumnUsage
package main
import (
	"fmt"
	"math"
	"net/url"
	"strconv"
	"strings"
	"time"
	"github.com/go-kit/kit/log/level"
	"github.com/lib/pq"
)
func contains(a []string, x string) bool {
	for _, n := range a {
		if x == n {
			return true
		}
	}
	return false
}