mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clean format with gofmt -w
This commit is contained in:
parent
823691feaa
commit
9da955ca75
@ -280,7 +280,6 @@ func (s *Store) internalGet(key string) *Response {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Get all the items under key
|
// Get all the items under key
|
||||||
// If key is a file return the file
|
// If key is a file return the file
|
||||||
// If key is a directory reuturn an array of files
|
// If key is a directory reuturn an array of files
|
||||||
@ -352,7 +351,6 @@ func (s *Store) Delete(key string, index uint64) ([]byte, error) {
|
|||||||
|
|
||||||
s.Tree.delete(key)
|
s.Tree.delete(key)
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
resp.Expiration = &node.ExpireTime
|
resp.Expiration = &node.ExpireTime
|
||||||
// Kill the expire go routine
|
// Kill the expire go routine
|
||||||
|
@ -2,8 +2,8 @@ package store
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package store
|
package store
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
"fmt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStoreGet(t *testing.T) {
|
func TestStoreGet(t *testing.T) {
|
||||||
@ -60,7 +60,6 @@ func TestStoreGet(t *testing.T) {
|
|||||||
t.Fatalf("Expect cannot delet /hello, but deleted! ")
|
t.Fatalf("Expect cannot delet /hello, but deleted! ")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// test list
|
// test list
|
||||||
ts.set("/hello/fooo", CreateTestNode("barbarbar"))
|
ts.set("/hello/fooo", CreateTestNode("barbarbar"))
|
||||||
ts.set("/hello/foooo/foo", CreateTestNode("barbarbar"))
|
ts.set("/hello/foooo/foo", CreateTestNode("barbarbar"))
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Typedefs
|
// Typedefs
|
||||||
@ -85,7 +86,6 @@ func checkResponse(prefix string, index uint64, resMap *map[string]Response) boo
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Notify the watcher a action happened
|
// Notify the watcher a action happened
|
||||||
func (w *WatcherHub) notify(resp Response) error {
|
func (w *WatcherHub) notify(resp Response) error {
|
||||||
resp.Key = path.Clean(resp.Key)
|
resp.Key = path.Clean(resp.Key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user