MCPcopy Create free account
hub / github.com/cli/cli / IsHTMLFile

Function IsHTMLFile

pkg/cmd/issue/artifact/shared/content.go:56–59  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
56func 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.

Callers 2

artifactTypeMethod · 0.92
TestIsHTMLFileFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsHTMLFileFunction · 0.68