Help us shape the future of Go! Take the 2026 Go Developer Survey

mcobra

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 3 Imported by: 4

README

mango-coral

Latest Release Build Status Go ReportCard GoDoc

coral adapter for mango.

Example

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()))
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommand

func AddCommand(m *mango.ManPage, c *coral.Command) error

AddCommand adds a coral.Command to a mango.ManPage.

func NewManPage

func NewManPage(section uint, c *coral.Command) (*mango.ManPage, error)

NewManPage creates a new mango.ManPage from a coral.Command.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL