MCPcopy
hub / github.com/NVIDIA/aistore / parseDest

Function parseDest

cmd/cli/commands/utils.go:280–290  ·  view source on GitHub ↗
(c *cli.Context, uri string)

Source from the content-addressed store, hash-verified

278}
279
280func parseDest(c *cli.Context, uri string) (bck cmn.Bck, pathSuffix string, err error) {
281 bck, pathSuffix, err = parseBckObjectURI(c, uri, true /*optional objName*/)
282 if err != nil {
283 return
284 } else if bck.IsHTTP() {
285 err = fmt.Errorf("http bucket is not supported as destination")
286 return
287 }
288 pathSuffix = strings.Trim(pathSuffix, "/")
289 return
290}
291
292func parseBckURI(c *cli.Context, uri string, requireProviderInURI ...bool) (cmn.Bck, error) {
293 if isWebURL(uri) {

Callers 3

TestParseDestValidURIsFunction · 0.85
TestParseDestInvalidURIsFunction · 0.85
startDownloadHandlerFunction · 0.85

Calls 2

parseBckObjectURIFunction · 0.85
IsHTTPMethod · 0.45

Tested by 2

TestParseDestValidURIsFunction · 0.68
TestParseDestInvalidURIsFunction · 0.68