pkg

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 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.

Types

type HTMLRenderer added in v0.8.1

type HTMLRenderer struct {
	// AdditionalFS and AdditionalPattern can be optionally provided
	// to override some components
	AdditionalFS       fs.FS
	AdditionalPatterns []string
}

func (HTMLRenderer) Render added in v0.8.1

func (hr HTMLRenderer) Render(out io.Writer, pkg Package) error

Render HTML for the given Package.

type Package

type Package struct {
	ModulePath   string
	PackageChain []string
	VCS          autodiscovery.VCS
	Ref          string // ref for the autodiscovery links
	Stylesheets  []string
	SubPackages  []string
	SubSynopsis  map[string]string

	// populated by calling ParseFS
	Doc *doc.Package
	// contains filtered or unexported fields
}

Package holds the documentation data of a given package.

func (*Package) ParseFS added in v0.8.1

func (p *Package) ParseFS(subFS fs.FS) 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