func PackTags(in map[string]string) string {
	tags := []string{}
	for k, v := range in {
		tags = append(tags, fmt.Sprintf("%s:%s", k, v))
	}
	sort.Strings(tags)
	return strings.Join(tags, ",")
}
PackTags converts map[string]string to a serialized tags list
package utils
import (
	"fmt"
	"os"
	"sort"
	"strings"
)
func PathExists(path string) bool {
	_, err := os.Lstat(path)
	if err != nil && os.IsNotExist(err) {
		return false
	}
	return true
}
func StringInSlice(key string, list []string) bool {
	for _, entry := range list {
		if entry == key {
			return true
		}
	}
	return false
}
func Int64InSlice(key int64, list []int64) bool {
	for _, entry := range list {
		if entry == key {
			return true
		}
	}
	return false
}
func ParseTags(in string) (map[string]string, error) {
	out := map[string]string{}
	for _, entry := range strings.Split(in, ",") {
		entry = strings.TrimSpace(entry)
		if entry == "" {
			continue
		}
		fields := strings.SplitN(entry, ":", 2)
		if len(fields) < 2 {
			return nil, fmt.Errorf("Invalid tag: %s", entry)
		}
		_, ok := out[fields[0]]
		if ok {
			return nil, fmt.Errorf("Duplicate tag: %s", entry)
		}
		out[fields[0]] = fields[1]
	}
	return out, nil
}