···13 FormatMarkdown: []string{".md", ".markdown", ".mdown", ".mkdn", ".mkd"},
14}
1500000000000016func GetFormat(filename string) Format {
17 for format, extensions := range FileTypes {
18 for _, extension := range extensions {
···13 FormatMarkdown: []string{".md", ".markdown", ".mdown", ".mkdn", ".mkd"},
14}
1516+// ReadmeFilenames contains the list of common README filenames to search for,
17+// in order of preference. Only includes well-supported formats.
18+var ReadmeFilenames = []string{
19+ "README.md", "readme.md",
20+ "README",
21+ "readme",
22+ "README.markdown",
23+ "readme.markdown",
24+ "README.txt",
25+ "readme.txt",
26+}
27+28func GetFormat(filename string) Format {
29 for format, extensions := range FileTypes {
30 for _, extension := range extensions {