IsHTMLFile reports whether path is an HTML file, which create reads as an HTML document. It goes by the .html and .htm extensions, in any case.
(path string)
| 54 | // IsHTMLFile reports whether path is an HTML file, which create reads as an |
| 55 | // HTML document. It goes by the .html and .htm extensions, in any case. |
| 56 | func IsHTMLFile(path string) bool { |
| 57 | ext := filepath.Ext(path) |
| 58 | return strings.EqualFold(ext, ".html") || strings.EqualFold(ext, ".htm") |
| 59 | } |
| 60 | |
| 61 | // ErrNoShortcutSection is ShortcutURL's error for content with no |
| 62 | // [InternetShortcut] section, such as a bare URL, so a caller can add a hint. |
no outgoing calls