(s3Path string)
| 73 | } |
| 74 | |
| 75 | func SplitS3Path(s3Path string) (string, string, error) { |
| 76 | if !IsValidS3Path(s3Path) { |
| 77 | return "", "", ErrorInvalidS3Path(s3Path) |
| 78 | } |
| 79 | fullPath := s3Path[len("s3://"):] |
| 80 | slashIndex := strings.Index(fullPath, "/") |
| 81 | if slashIndex == -1 { |
| 82 | return fullPath, "", nil |
| 83 | } |
| 84 | bucket := fullPath[0:slashIndex] |
| 85 | key := fullPath[slashIndex+1:] |
| 86 | |
| 87 | return bucket, key, nil |
| 88 | } |
| 89 | |
| 90 | func SplitS3aPath(s3aPath string) (string, string, error) { |
| 91 | if !IsValidS3aPath(s3aPath) { |
no test coverage detected