// encodePrivs encodes priv map into DB-ready string
encodePrivs encodes priv map into DB-ready string
// encodePrivs encodes priv map into DB - ready string
func encodePrivs(privs map[string]bool) string {
	lenP := 0
	for priv := range privs {
		if privs[priv] {
			lenP++
		}
	}
	ps := make([]string, lenP)
	i := 0
	for priv := range privs {
		if privs[priv] {
			ps[i] = priv
			i++
		}
	}
	r := strings.Join(ps, "|")
	return r
}
func encodePrivs ( privs map [ string ] bool ) string { lenP := 0 for priv := range privs { if privs [ priv ] { lenP ++ } } ps := make ( [ ] string , lenP ) i := 0 for priv := range privs { if privs [ priv ] { ps [ i ] = priv i ++ } } r := strings . Join ( ps , " " ) return r }
encodePrivs encodes priv map into DB-ready string
encodePrivs encodes priv map into DB - ready string