This commit is contained in:
Chris Lu
2018-05-27 11:52:26 -07:00
parent 8647191bee
commit 458ada173e
36 changed files with 105 additions and 107 deletions

View File

@@ -1,15 +1,15 @@
package leveldb
import (
"fmt"
"bytes"
"fmt"
"github.com/syndtr/goleveldb/leveldb"
"github.com/chrislusf/seaweedfs/weed/filer2"
leveldb_util "github.com/syndtr/goleveldb/leveldb/util"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/spf13/viper"
weed_util "github.com/chrislusf/seaweedfs/weed/util"
"github.com/spf13/viper"
"github.com/syndtr/goleveldb/leveldb"
leveldb_util "github.com/syndtr/goleveldb/leveldb/util"
)
const (
@@ -162,7 +162,7 @@ func genDirectoryKeyPrefix(fullpath filer2.FullPath, startFileName string) (keyP
return keyPrefix
}
func getNameFromKey(key []byte) (string) {
func getNameFromKey(key []byte) string {
sepIndex := len(key) - 1
for sepIndex >= 0 && key[sepIndex] != DIR_FILE_SEPARATOR {

View File

@@ -1,10 +1,10 @@
package leveldb
import (
"testing"
"github.com/chrislusf/seaweedfs/weed/filer2"
"io/ioutil"
"os"
"testing"
)
func TestCreateAndFind(t *testing.T) {