code: func keyWatch(params map[string]interface{}) (WatcherFunc, error) {
  	stale := false
  	if err := assignValueBool(params, "stale", &stale); err != nil {
  		return nil, err
  	}
  
  	var key string
  	if err := assignValue(params, "key", &key); err != nil {
  		return nil, err
  	}
  	if key == "" {
  		return nil, fmt.Errorf("Must specify a single key to watch")
  	}
  	fn := func(p *Plan) (BlockingParamVal, interface{}, error) {
  		kv := p.client.KV()
  		opts := makeQueryOptionsWithContext(p, stale)
  		defer p.cancelFunc()
  		pair, meta, err := kv.Get(key, &opts)
  		if err != nil {
  			return nil, nil, err
  		}
  		if pair == nil {
  			return WaitIndexVal(meta.LastIndex), nil, err
  		}
  		return WaitIndexVal(meta.LastIndex), pair, err
  	}
  	return fn, nil
  }
docs: // keyWatch is used to return a key watching function