pkg

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

package pkg computes and generate documentation for a given package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyAsset

func CopyAsset(dst io.Writer, name string) error

CopyAsset copy the given assets from the template folder.

func Gemtext

func Gemtext(out io.Writer, pkg Package) error

Gemtext generates gemtext for the given Package.

func HTML

func HTML(out io.Writer, pkg Package) error

HTML generates html for the given Package.

Types

type Package

type Package struct {
	Doc         *doc.Package
	FileSet     *token.FileSet
	ModulePath  string
	VCS         autodiscovery.VCS
	Stylesheets []string
	SubPackages []string
	Synopsis    func(string) string
	Breadcrumbs func() []string
}

Package holds the documentation data of a given package.

func NewPackage

func NewPackage(pkgFS fs.FS, importPath string) (Package, error)

NewPackage computes Doc and FileSet fields for a package.

Notes

Bugs

  • no idea how build tags should be managed

Jump to

Keyboard shortcuts

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