MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / parseObjectPath

Function parseObjectPath

server/s3/redirect.go:131–137  ·  view source on GitHub ↗
(rawPath string)

Source from the content-addressed store, hash-verified

129}
130
131func parseObjectPath(rawPath string) (bucket, object string, ok bool) {
132 parts := strings.SplitN(strings.TrimPrefix(rawPath, "/"), "/", 2)
133 if len(parts) != 2 || parts[0] == "" || parts[1] == "" {
134 return "", "", false
135 }
136 return parts[0], parts[1], true
137}
138
139// hasNonObjectQuery reports whether the request carries a query parameter that
140// makes gofakes3 route it to a sub-resource handler instead of plain object

Callers 3

directObjectURLFunction · 0.85
directUploadURLFunction · 0.85
TestParseObjectPathFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestParseObjectPathFunction · 0.68