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

mlange-42 / modo / 12810588007

16 Jan 2025 02:06PM CUT coverage: 36.851% (+0.3%) from 36.569%
12810588007

push

github

web-flow
Error on no exports, silence help (#43)

20 of 33 new or added lines in 4 files covered. (60.61%)

2 existing lines in 2 files now uncovered.

447 of 1213 relevant lines covered (36.85%)

2.66 hits per line

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

0.0
/format/hugo.go
1
package format
2

3
import (
4
        "fmt"
5
        "path"
6

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

10
type HugoFormatter struct{}
11

12
const hugoFrontMatter = `+++
13
type = "docs"
14
title = "%s"
15
#summary = """%s"""
16
+++
17

18
%s
19
`
20

21
func (f *HugoFormatter) ProcessMarkdown(name, summary, text string) (string, error) {
×
22
        return fmt.Sprintf(hugoFrontMatter, name, summary, text), nil
×
23
}
×
24

25
func (f *HugoFormatter) WriteAuxiliary(p *document.Package, dir string, proc *document.Processor) error {
×
26
        return nil
×
27
}
×
28

29
func (f *HugoFormatter) ToFilePath(p string, kind string) (string, error) {
×
30
        if kind == "package" || kind == "module" {
×
31
                return path.Join(p, "_index.md"), nil
×
32
        }
×
33
        return p + ".md", nil
×
34
}
35

36
func (f *HugoFormatter) ToLinkPath(p string, kind string) (string, error) {
×
37
        return fmt.Sprintf("{{< ref \"%s\" >}}", p), nil
×
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