man

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateManPage

func GenerateManPage(cmd *cobra.Command, options *Options, w io.Writer) error

GenerateManPage writes the man page, taking the given command as root, to a writer.

Types

type Header struct {
	// Man page title.
	Title string
	// Man page section.
	// Use "1" for General commands.
	// Use "2" for System calls.
	// Use "3" for Library functions, covering in particular the C standard library.
	// Use "4" for Special files (usually devices, those found in /dev) and drivers.
	// Use "5" for File formats and conventions.
	// Use "6" for Games and screensavers.
	// Use "7" for Miscellanea.
	// Use "8" for System administration commands and daemons.
	Section string
	// Manual title.
	Manual string
}

Header conveys general data of the man page.

type Options

type Options struct {
	Header  Header   // General data.
	Origin  Origin   // Data representing the origin of this man page.
	SeeAlso []string // Links to other man pages, e.g. "ps(1)"
}

Options specify the common properties of the man page.

type Origin

type Origin struct {
	Source string    // Origin of the man page.
	Date   time.Time // The Date when the man page was written.
}

Origin conveys data of the man page origin.

Jump to

Keyboard shortcuts

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