(str, hostname, username string)
| 498 | } |
| 499 | |
| 500 | func 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 | } |
no test coverage detected