MCPcopy
hub / github.com/kopia/kopia / parseFullSource

Function parseFullSource

cli/command_snapshot_create.go:500–509  ·  view source on GitHub ↗
(str, hostname, username string)

Source from the content-addressed store, hash-verified

498}
499
500func parseFullSource(str, hostname, username string) (snapshot.SourceInfo, error) {
501 sourceInfo, err := snapshot.ParseSourceInfo(str, hostname, username)
502 if err != nil {
503 return snapshot.SourceInfo{}, errors.Wrapf(err, "not a valid source %v", str)
504 } else if sourceInfo.Host == "" || sourceInfo.UserName == "" || sourceInfo.Path == "" {
505 return snapshot.SourceInfo{}, errors.Errorf("source does not resolve into host, user and path: '%s'", str)
506 }
507
508 return sourceInfo, nil
509}

Callers 1

getContentToSnapshotMethod · 0.85

Calls 2

ParseSourceInfoFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected