https://github.com/muesli/mango-coral
coral adapter for mango
https://github.com/muesli/mango-coral
Last synced: about 1 month ago
JSON representation
coral adapter for mango
- Host: GitHub
- URL: https://github.com/muesli/mango-coral
- Owner: muesli
- License: mit
- Created: 2022-02-02T12:55:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-16T07:59:35.000Z (over 2 years ago)
- Last Synced: 2025-03-31T11:11:15.321Z (3 months ago)
- Language: Go
- Size: 23.4 KB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# mango-coral
[](https://github.com/muesli/mango-coral/releases)
[](https://github.com/muesli/mango-coral/actions)
[](https://goreportcard.com/report/muesli/mango-coral)
[](https://pkg.go.dev/github.com/muesli/mango-coral)[coral](https://github.com/muesli/coral/tree/coral) adapter for [mango](https://github.com/muesli/mango).
## Example
```go
import (
"fmt"mcoral "github.com/muesli/mango-coral"
"github.com/muesli/roff"
"github.com/muesli/coral"
)var (
rootCmd = &coral.Command{
Use: "mango",
Short: "A man-page generator",
}
)func main() {
manPage, err := mcoral.NewManPage(1, rootCmd)
if err != nil {
panic(err)
}manPage = manPage.WithSection("Copyright", "(C) 2022 Christian Muehlhaeuser.\n"+
"Released under MIT license.")fmt.Println(manPage.Build(roff.NewDocument()))
}
```