( ctx context.Context, parts []string, )
| 79 | } |
| 80 | |
| 81 | func (p *Parser) DecodeURL( |
| 82 | ctx context.Context, |
| 83 | parts []string, |
| 84 | ) (string, string, error) { |
| 85 | if len(parts) == 0 { |
| 86 | return "", "", newInvalidURLError(ctx, "Image URL is empty") |
| 87 | } |
| 88 | |
| 89 | if parts[0] == urlTokenPlain && len(parts) > 1 { |
| 90 | return p.decodePlainURL(ctx, parts[1:]) |
| 91 | } |
| 92 | |
| 93 | return p.decodeBase64URL(ctx, parts) |
| 94 | } |
no test coverage detected