mirror of https://github.com/docker/docs.git
store: fix gofmt
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
0f61855877
commit
60cfbc89c2
|
@ -116,7 +116,7 @@ func (s *Consul) Exists(key string) (bool, error) {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetRange gets a range of values at "directory"
|
// List values at "directory"
|
||||||
func (s *Consul) List(prefix string) ([]*KVPair, error) {
|
func (s *Consul) List(prefix string) ([]*KVPair, error) {
|
||||||
pairs, _, err := s.client.KV().List(s.normalize(prefix), nil)
|
pairs, _, err := s.client.KV().List(s.normalize(prefix), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -135,7 +135,7 @@ func (s *Consul) List(prefix string) ([]*KVPair, error) {
|
||||||
return kv, nil
|
return kv, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteRange deletes a range of values at "directory"
|
// DeleteTree deletes a range of values at "directory"
|
||||||
func (s *Consul) DeleteTree(prefix string) error {
|
func (s *Consul) DeleteTree(prefix string) error {
|
||||||
_, err := s.client.KV().DeleteTree(s.normalize(prefix), nil)
|
_, err := s.client.KV().DeleteTree(s.normalize(prefix), nil)
|
||||||
return err
|
return err
|
||||||
|
@ -207,7 +207,7 @@ func (s *Consul) waitForChange(key string) <-chan uint64 {
|
||||||
return ch
|
return ch
|
||||||
}
|
}
|
||||||
|
|
||||||
// WatchRange triggers a watch on a range of values at "directory"
|
// WatchTree triggers a watch on a range of values at "directory"
|
||||||
func (s *Consul) WatchTree(prefix string, callback WatchCallback) error {
|
func (s *Consul) WatchTree(prefix string, callback WatchCallback) error {
|
||||||
fprefix := s.normalize(prefix)
|
fprefix := s.normalize(prefix)
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ func (s *Etcd) AtomicDelete(key string, previous *KVPair) (bool, error) {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetRange gets a range of values at "directory"
|
// List a range of values at "directory"
|
||||||
func (s *Etcd) List(prefix string) ([]*KVPair, error) {
|
func (s *Etcd) List(prefix string) ([]*KVPair, error) {
|
||||||
resp, err := s.client.Get(normalize(prefix), true, true)
|
resp, err := s.client.Get(normalize(prefix), true, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -206,7 +206,7 @@ func (s *Etcd) List(prefix string) ([]*KVPair, error) {
|
||||||
return kv, nil
|
return kv, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteRange deletes a range of values at "directory"
|
// DeleteTree deletes a range of values at "directory"
|
||||||
func (s *Etcd) DeleteTree(prefix string) error {
|
func (s *Etcd) DeleteTree(prefix string) error {
|
||||||
if _, err := s.client.Delete(normalize(prefix), true); err != nil {
|
if _, err := s.client.Delete(normalize(prefix), true); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -214,7 +214,7 @@ func (s *Etcd) DeleteTree(prefix string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// WatchRange triggers a watch on a range of values at "directory"
|
// WatchTree triggers a watch on a range of values at "directory"
|
||||||
func (s *Etcd) WatchTree(prefix string, callback WatchCallback) error {
|
func (s *Etcd) WatchTree(prefix string, callback WatchCallback) error {
|
||||||
prefix = normalize(prefix)
|
prefix = normalize(prefix)
|
||||||
watchChan := make(chan *etcd.Response)
|
watchChan := make(chan *etcd.Response)
|
||||||
|
|
|
@ -138,7 +138,7 @@ func (s *Zookeeper) CancelWatch(key string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetRange gets a range of values at "directory"
|
// List a range of values at "directory"
|
||||||
func (s *Zookeeper) List(prefix string) ([]*KVPair, error) {
|
func (s *Zookeeper) List(prefix string) ([]*KVPair, error) {
|
||||||
prefix = normalize(prefix)
|
prefix = normalize(prefix)
|
||||||
entries, stat, err := s.client.Children(prefix)
|
entries, stat, err := s.client.Children(prefix)
|
||||||
|
@ -153,13 +153,13 @@ func (s *Zookeeper) List(prefix string) ([]*KVPair, error) {
|
||||||
return kv, err
|
return kv, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteRange deletes a range of values at "directory"
|
// DeleteTree deletes a range of values at "directory"
|
||||||
func (s *Zookeeper) DeleteTree(prefix string) error {
|
func (s *Zookeeper) DeleteTree(prefix string) error {
|
||||||
err := s.client.Delete(normalize(prefix), -1)
|
err := s.client.Delete(normalize(prefix), -1)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// WatchRange triggers a watch on a range of values at "directory"
|
// WatchTree triggers a watch on a range of values at "directory"
|
||||||
func (s *Zookeeper) WatchTree(prefix string, callback WatchCallback) error {
|
func (s *Zookeeper) WatchTree(prefix string, callback WatchCallback) error {
|
||||||
fprefix := normalize(prefix)
|
fprefix := normalize(prefix)
|
||||||
_, _, eventChan, err := s.client.ChildrenW(fprefix)
|
_, _, eventChan, err := s.client.ChildrenW(fprefix)
|
||||||
|
|
Loading…
Reference in New Issue