💾 Archived View for code.pfad.fr › vanitydoc › pkg captured on 2023-04-19 at 22:22:16. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

➡️ Next capture (2023-05-24)

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

pkg package

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(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.

TODO: manage build tags

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@codeberg.org:pfad.fr/vanitydoc