projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
run_test_server doesn't assume ARVADOS_API_TOKEN is set.
[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 c2780bc716171e7e1b96efd76ec2ed1fa2af26d5..a8afea096109531ad0e27bf4c31e5b26010c8538 100644
(file)
--- a/
sdk/go/keepclient/root_sorter.go
+++ b/
sdk/go/keepclient/root_sorter.go
@@
-5,12
+5,12
@@
import (
)
type RootSorter struct {
)
type RootSorter struct {
- root
[]string
- weight
[]string
- order
[]int
+ root []string
+ weight []string
+ order []int
}
}
-func NewRootSorter(serviceRoots map[string]string, hash string)
(*RootSorter)
{
+func NewRootSorter(serviceRoots map[string]string, hash string)
*RootSorter
{
rs := new(RootSorter)
rs.root = make([]string, len(serviceRoots))
rs.weight = make([]string, len(serviceRoots))
rs := new(RootSorter)
rs.root = make([]string, len(serviceRoots))
rs.weight = make([]string, len(serviceRoots))
@@
-26,7
+26,7
@@
func NewRootSorter(serviceRoots map[string]string, hash string) (*RootSorter) {
return rs
}
return rs
}
-func (rs RootSorter) getWeight(hash string, uuid string)
(string)
{
+func (rs RootSorter) getWeight(hash string, uuid string)
string
{
if len(uuid) == 27 {
return Md5String(hash + uuid[12:])
} else {
if len(uuid) == 27 {
return Md5String(hash + uuid[12:])
} else {
@@
-35,7
+35,7
@@
func (rs RootSorter) getWeight(hash string, uuid string) (string) {
}
}
}
}
-func (rs RootSorter) GetSortedRoots()
([]string)
{
+func (rs RootSorter) GetSortedRoots()
[]string
{
sorted := make([]string, len(rs.order))
for i := range rs.order {
sorted[i] = rs.root[rs.order[i]]
sorted := make([]string, len(rs.order))
for i := range rs.order {
sorted[i] = rs.root[rs.order[i]]