manpage

package
v0.0.0-...-4afba3a Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	// Name is e.g. “w3m”, or “systemd.service”.
	Name string

	// Package is the Debian binary package from which this manpage
	// was extracted.
	Package *PkgMeta

	// Section is the man section to which this manpage belongs,
	// e.g. 1, 3pm, …
	Section string

	// Language is the locale-like language directory
	// (i.e. language[_territory][.codeset][@modifier], with language coming
	// from ISO639 and territory coming from ISO3166) in which this
	// manpage was found.
	Language    string
	LanguageTag language.Tag
}

func FromManPath

func FromManPath(path string, p *PkgMeta) (*Meta, error)

FromManPath constructs a manpage, gathering details from path (relative underneath /usr/share/man).

func FromServingPath

func FromServingPath(servingDir, path string) (*Meta, error)

FromServingPath constructs a manpage, gathering details from path

func (*Meta) MainSection

func (m *Meta) MainSection() string
func (m *Meta) PermaLink() string

func (*Meta) RawPath

func (m *Meta) RawPath() string

RawPath returns the path to access the raw manpage equivalent of what is currently being served, i.e. locked to the current language.

func (*Meta) ServingPath

func (m *Meta) ServingPath() string

func (*Meta) String

func (m *Meta) String() string

type PkgMeta

type PkgMeta struct {
	Component string
	Filename  string
	Sourcepkg string
	Binarypkg string
	Replaces  []string

	// Version is used by the templates when rendering.
	Version version.Version

	// Suite is the Debian suite in which this binary package was
	// found.
	Suite string
}

func (*PkgMeta) SameBinary

func (p *PkgMeta) SameBinary(o *PkgMeta) bool

Jump to

Keyboard shortcuts

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