func (k *KV) List(prefix string, q *QueryOptions) (KVPairs, *QueryMeta, error) {
	resp, qm, err := k.getInternal(prefix, map[string]string{"recurse": ""}, q)
	if err != nil {
		return nil, nil, err
	}
	if resp == nil {
		return nil, qm, nil
	}
	defer resp.Body.Close()
	var entries []*KVPair
	if err := decodeBody(resp, &entries); err != nil {
		return nil, nil, err
	}
	return entries, qm, nil
}
List is used to lookup all keys under a prefix
package api
import (
	"bytes"
	"fmt"
	"io"
	"net/http"
	"strconv"
	"strings"
)
type KVPair struct {
	Key string
	CreateIndex uint64
	ModifyIndex uint64
	LockIndex uint64
	Flags uint64
	Value []byte
	Session string
	Namespace string `json:",omitempty"`
}
type KVPairs []*KVPair
type KV struct {
	c *Client
}
func (c *Client) KV() *KV {
	return &KV{c}
}
func (k *KV) Get(key string, q *QueryOptions) (*KVPair, *QueryMeta, error) {
	resp, qm, err := k.getInternal(key, nil, q)
	if err != nil {
		return nil, nil, err
	}
	if resp == nil {
		return nil, qm, nil
	}
	defer resp.Body.Close()
	var entries []*KVPair
	if err := decodeBody(resp, &entries); err != nil {
		return nil, nil, err
	}
	if len(entries) > 0 {
		return entries[0], qm, nil
	}
	return nil, qm, nil
}