func NewKVListQuery(s string) (*KVListQuery, error) {
	if s != "" && !KVListQueryRe.MatchString(s) {
		return nil, fmt.Errorf("kv.list: invalid format: %q", s)
	}

	m := regexpMatch(KVListQueryRe, s)
	return &KVListQuery{
		stopCh: make(chan struct{}, 1),
		dc:     m["dc"],
		prefix: m["prefix"],
	}, nil
}
func NewKVListQuery(s string) (*KVListQuery, error) {
	if s != "" && !KVListQueryRe.MatchString(s) {
		return nil, fmt.Errorf("kv.list: invalid format: %q", s)
	}

	m := regexpMatch(KVListQueryRe, s)
	return &KVListQuery{
		stopCh: make(chan struct{}, 1),
		dc:     m["dc"],
		prefix: m["prefix"],
	}, nil
}
func NewKVListQuery ( s string ) ( * KVListQuery , error ) { if s != " " && ! KVListQueryRe . MatchString ( s ) { return nil , fmt . Errorf ( " " , s ) } m := regexpMatch ( KVListQueryRe , s ) return & KVListQuery { stopCh : make ( chan struct { } , 1 ) , dc : m [ " " ] , prefix : m [ " " ] , } , nil }
// NewKVListQuery parses a string into a dependency.
NewKVListQuery parses a string into a dependency .