func (h hash) HMGet(fields ...string) []interface{} {
	ret := make([]interface{}, len(fields))
	for i, f := range fields {
		if v, ok := h[f]; ok {
			ret[i] = v
		}
	}
	return ret
}
HMGet returns the list of values for all requested fields, in the
order of the requested fields. It returns a nil value at the position
of non-existing fields.
package types
type Hash interface {
	Value
	HDel(...string) int64
	HExists(string) bool
	HGet(string) (string, bool)
	HGetAll() []string
	HKeys() []string
	HLen() int64
	HMGet(...string) []interface{}
	HMSet(...string)
	HSet(string, string) bool
	HSetNx(string, string) bool
	HVals() []string
}
var _ Hash = hash(nil)
type hash map[string]string
func NewHash() Hash {
	return make(hash)
}
func (h hash) Type() string {
	return "hash"
}
func (h hash) HDel(fields ...string) int64 {
	var cnt int64
	for _, f := range fields {
		if _, ok := h[f]; ok {
			cnt++
			delete(h, f)
		}
	}
	return cnt
}
func (h hash) HExists(field string) bool {
	_, ok := h[field]
	return ok
}
func (h hash) HGet(field string) (string, bool) {
	v, ok := h[field]
	return v, ok
}
func (h hash) HGetAll() []string {
	if len(h) == 0 {
		return empty
	}
	vals := make([]string, 2*len(h))
	i := 0
	for k, v := range h {
		vals[i] = k
		vals[i+1] = v
		i += 2
	}
	return vals
}
func (h hash) HKeys() []string {
	if len(h) == 0 {
		return empty
	}
	keys := make([]string, len(h))
	i := 0
	for k := range h {
		keys[i] = k
		i++
	}
	return keys
}
func (h hash) HLen() int64 {
	return int64(len(h))
}