💾 Archived View for code.pfad.fr › vanitydoc › pkg captured on 2023-09-08 at 15:51:37. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-07-10)

🚧 View Differences

-=-=-=-=-=-=-

pkg package - code.pfad.fr/vanitydoc

import "code.pfad.fr/vanitydoc/pkg"

package pkg computes and generate documentation for a given package.

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(fs fs.FS, patterns ...string) func(out io.Writer, pkg Package) error

HTML creates an html-generator. The fs and patterns are not nil, they will be parsed as HTML templates to override the defaults.

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.

Bugs

Files

doc.go

gemtext.go

gemtext_comment.go

html.go

Forge

https://codeberg.org/pfad.fr/vanitydoc

git clone

https://codeberg.org/pfad.fr/vanitydoc.git
git@codeberg.org:pfad.fr/vanitydoc.git