clean format with gofmt -w

This commit is contained in:
Cong Ding 2013-07-16 19:44:09 +02:00
parent 823691feaa
commit 9da955ca75
6 changed files with 44 additions and 47 deletions

View File

@ -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

View File

@ -2,8 +2,8 @@ package store
import ( import (
"path" "path"
"strings"
"sort" "sort"
"strings"
) )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View File

@ -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"))

View File

@ -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)