- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for splitPath (0.15 sec)
-
cmd/iam-object-store_test.go
{ "policydb/groups/cn=project/d,ou=groups,ou=swengg,dc=min,dc=io.json", true, "policydb/groups/", "cn=project/d,ou=groups,ou=swengg,dc=min,dc=io.json", }, } for i, test := range cases { listKey, item := splitPath(test.path, test.secondIndex) if listKey != test.expectedListKey || item != test.expectedItem { t.Errorf("unexpected result on test[%v]: expected[%s, %s] but got [%s, %s]", i, test.expectedListKey, test.expectedItem, listKey, item)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 23:40:37 UTC 2024 - 2K bytes - Viewed (0) -
cmd/iam-object-store.go
return -1 } second := strings.Index(s[first+1:], substr) if second == -1 { return -1 } return first + second + 1 } // splitPath splits a path into a top-level directory and a child item. The // parent directory retains the trailing slash. func splitPath(s string, secondIndex bool) (string, string) { var i int if secondIndex { i = findSecondIndex(s, "/") } else { i = strings.Index(s, "/") }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 23:40:37 UTC 2024 - 26.6K bytes - Viewed (0) -
docs/debugging/xl-meta/main.go
return err } splitData, err := rs.Split(m.mapped) if err != nil { return err } // Do separate encode, verify we get the same result. err = rs.Encode(splitData) if err != nil { return err } misMatches := 0 for idx, sh := range parityData { calculated := splitData[idx] if !bytes.Equal(calculated, sh) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 05 11:57:44 UTC 2024 - 40.3K bytes - Viewed (0)