claire

package module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: OSL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

generator.go

highlight.go

parser.go

types.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(sourceDir, outputDir, repoUrl, version, importPath string) error

Generate creates HTML documentation for all packages within a Go module

Types

type FuncDoc

type FuncDoc struct {
	Name      string
	Doc       string
	Signature template.HTML
}

FuncDoc holds documentation for a single function or method.

type PackageDoc

type PackageDoc struct {
	Name           string
	RepositoryUrl  string
	Version        string
	ImportPath     string
	StyleSheetPath string
	Doc            string
	Functions      []FuncDoc
	Types          []TypeDoc
	Variables      []VarDoc
	Constants      []VarDoc
	SubPackages    []string
}

PackageDoc holds all the documentation for a single package.

func ParsePackageDoc added in v1.1.9

func ParsePackageDoc(inputPath string) (*PackageDoc, error)

ParsePackageDoc parses the Go package in the given directory and returns an initialized PackageDoc. It does not populate metadata fields like RepositoryUrl or Version.

func (*PackageDoc) IsEmpty added in v1.0.2

func (p *PackageDoc) IsEmpty() bool

IsEmpty reports whether the package documentation is empty (has no content).

func (*PackageDoc) Render added in v1.1.4

func (p *PackageDoc) Render(outputPath string) error

Render generates the HTML documentation file using the embedded template.

type TypeDoc

type TypeDoc struct {
	Constants  []VarDoc // Constants grouped under this type
	Definition template.HTML
	Doc        string
	Functions  []FuncDoc // Constructors/factory functions associated with this type.
	Methods    []FuncDoc
	Name       string
	Variables  []VarDoc // Variables grouped under this type
}

TypeDoc holds documentation for a type definition and its methods.

type VarDoc

type VarDoc struct {
	Doc        string
	Definition template.HTML
}

VarDoc holds documentation for a variable or constant declaration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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