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

mlange-42 / modo / 12771562747

14 Jan 2025 04:02PM CUT coverage: 33.838% (-0.2%) from 34.065%
12771562747

push

github

web-flow
Improve modularity, cleanup (#35)

* move link processing to Processor
* move collecting paths to Processor
* move link and path formatting to Formatter
* write auxiliary files from top-level render func

24 of 133 new or added lines in 8 files covered. (18.05%)

268 of 792 relevant lines covered (33.84%)

1.9 hits per line

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

0.0
/format/plain.go
1
package format
2

3
import (
4
        "path"
5
        "text/template"
6

7
        "github.com/mlange-42/modo/document"
8
)
9

10
type PlainFormatter struct{}
11

12
func (f *PlainFormatter) WriteAuxiliary(p *document.Package, dir string, t *template.Template) error {
×
13
        return nil
×
14
}
×
15

NEW
16
func (f *PlainFormatter) ToFilePath(p string, kind string) (string, error) {
×
NEW
17
        if kind == "package" || kind == "module" {
×
NEW
18
                return path.Join(p, "_index.md"), nil
×
NEW
19
        }
×
NEW
20
        return p + ".md", nil
×
21
}
22

NEW
23
func (f *PlainFormatter) ToLinkPath(p string, kind string) (string, error) {
×
NEW
24
        return f.ToFilePath(p, kind)
×
NEW
25
}
×
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