()
| 466 | } |
| 467 | |
| 468 | func (im *ImportMap) cdnOrigin() string { |
| 469 | cdn := im.config.CDN |
| 470 | if strings.HasPrefix(cdn, "https://") || strings.HasPrefix(cdn, "http://") { |
| 471 | return cdn |
| 472 | } |
| 473 | return "https://esm.sh" |
| 474 | } |
| 475 | |
| 476 | // MarshalJSON implements the json.Marshaler interface. |
| 477 | func (im *ImportMap) MarshalJSON() ([]byte, error) { |
no outgoing calls
no test coverage detected