dependency/kv_get.go
func NewKVGetQuery(s string) (*KVGetQuery, error) {
	if s != "" && !KVGetQueryRe.MatchString(s) {
		return nil, fmt.Errorf("kv.get: invalid format: %q", s)
	}

	m := regexpMatch(KVGetQueryRe, s)
	return &KVGetQuery{
		stopCh: make(chan struct{}, 1),
		dc:     m["dc"],
		key:    m["key"],
	}, nil
}
func NewKVGetQuery(s string) (*KVGetQuery, error) {
	if s != "" && !KVGetQueryRe.MatchString(s) {
		return nil, fmt.Errorf("kv.get: invalid format: %q", s)
	}

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