Fast Link Checker for Markdown and HTML in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
331 B

package main
import (
"path/filepath"
"strings"
)
var extensions = map[string]bool{
".htm": true,
".html": true,
".md": true,
}
func isMarkupFile(f string) bool {
_, ok := extensions[filepath.Ext(f)]
return ok
}
func isHTMLFile(f string) bool {
return strings.HasSuffix(f, ".html") || strings.HasSuffix(f, ".htm")
}