projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
3198: Support for truncating files. A few tests. Next step work on random access...
[arvados.git]
/
sdk
/
go
/
keepclient
/
root_sorter.go
diff --git
a/sdk/go/keepclient/root_sorter.go
b/sdk/go/keepclient/root_sorter.go
index 7a73d957a0e9ed4bcaf1f37c7b7ec224f1ac6bfc..c2780bc716171e7e1b96efd76ec2ed1fa2af26d5 100644
(file)
--- a/
sdk/go/keepclient/root_sorter.go
+++ b/
sdk/go/keepclient/root_sorter.go
@@
-1,8
+1,6
@@
package keepclient
import (
package keepclient
import (
- "crypto/md5"
- "fmt"
"sort"
)
"sort"
)
@@
-29,14
+27,12
@@
func NewRootSorter(serviceRoots map[string]string, hash string) (*RootSorter) {
}
func (rs RootSorter) getWeight(hash string, uuid string) (string) {
}
func (rs RootSorter) getWeight(hash string, uuid string) (string) {
- var service_key []byte
if len(uuid) == 27 {
if len(uuid) == 27 {
-
service_key = []byte
(hash + uuid[12:])
+
return Md5String
(hash + uuid[12:])
} else {
// Only useful for testing, a set of one service root, etc.
} else {
// Only useful for testing, a set of one service root, etc.
-
service_key = []byte
(hash + uuid)
+
return Md5String
(hash + uuid)
}
}
- return fmt.Sprintf("%x", md5.Sum(service_key))
}
func (rs RootSorter) GetSortedRoots() ([]string) {
}
func (rs RootSorter) GetSortedRoots() ([]string) {