Browse Source

Final polish

Signed-off-by: jolheiser <john.olheiser@gmail.com>
main v0.0.1
jolheiser 4 weeks ago
parent
commit
95922f3ce4
Signed by: jolheiser GPG Key ID: B853ADA5DA7BBF7A
  1. 9
      .woodpecker.yml
  2. 2
      emdbed.go
  3. 1
      emdbed_example_test.go

9
.woodpecker.yml

@ -0,0 +1,9 @@
pipeline:
compliance:
image: golang/1.17
commands:
- go test -race ./...
- go vet ./...
- go build go.jolheiser.com/emdbed/cmd/emdbed
when:
event: pull_request

2
emdbed.go

@ -36,7 +36,7 @@ func Convert(dir string, file io.Reader) (string, error) {
starts := start.FindAllStringSubmatchIndex(contents, -1)
ends := end.FindAllStringIndex(contents, -1)
if len(starts) != len(ends) {
return "", fmt.Errorf("starts (%d) != ends (%d)", len(starts), len(ends))
return "", fmt.Errorf("start selectors (%d) != end selectors (%d)", len(starts), len(ends))
}
var last int
for idx, start := range starts {

1
emdbed_example_test.go

@ -22,6 +22,7 @@ func Example() {
//func main() {
// fmt.Println("Hello, world!")
//}
//
// ```
//<!-- /emdbed -->
}

Loading…
Cancel
Save