• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / modo / 12777356798

14 Jan 2025 10:15PM CUT coverage: 33.894%. Remained the same
12777356798

Pull #38

github

web-flow
Merge 3224f39a6 into 3ddfea5df
Pull Request #38: Use actual element kind for path processing

0 of 1 new or added line in 1 file covered. (0.0%)

282 of 832 relevant lines covered (33.89%)

2.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/format/formats.go
1
package format
2

3
import "github.com/mlange-42/modo/document"
4

5
type Format uint8
6

7
const (
8
        Plain Format = iota
9
        MdBook
10
        Hugo
11
)
12

13
func GetFormat(f string) (Format, bool) {
×
14
        fm, ok := formats[f]
×
15
        return fm, ok
×
16
}
×
17

18
var formats = map[string]Format{
19
        "":       Plain,
20
        "plain":  Plain,
21
        "mdbook": MdBook,
22
        "hugo":   Hugo,
23
}
24

25
var formatters = []document.Formatter{
26
        &PlainFormatter{},
27
        &MdBookFormatter{},
28
        &HugoFormatter{},
29
}
30

31
type Config struct {
32
        Format          Format
33
        CaseInsensitive bool
34
}
35

36
func GetFormatter(f Format) document.Formatter {
×
37
        return formatters[f]
×
38
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc