doc

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package doc provides a mockable wrapper for go/doc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) Examples

func (*Impl) Examples(testFiles ...*ast.File) []*doc.Example

func (*Impl) IsPredeclared

func (*Impl) IsPredeclared(s string) bool

func (*Impl) New

func (*Impl) New(pkg *ast.Package, importPath string, mode doc.Mode) *doc.Package

func (*Impl) NewFromFiles

func (*Impl) NewFromFiles(fset *token.FileSet, files []*ast.File, importPath string, opts ...any) (*doc.Package, error)

func (*Impl) Synopsis

func (*Impl) Synopsis(s string) string

func (*Impl) ToHTML

func (*Impl) ToHTML(w io.Writer, text string, words map[string]string)

func (*Impl) ToText

func (*Impl) ToText(w io.Writer, text string, indent string, preIndent string, width int)

type Interface

type Interface interface {
	Examples(testFiles ...*ast.File) []*doc.Example
	IsPredeclared(s string) bool
	New(pkg *ast.Package, importPath string, mode doc.Mode) *doc.Package
	NewFromFiles(fset *token.FileSet, files []*ast.File, importPath string, opts ...any) (*doc.Package, error)
	Synopsis(s string) string
	ToHTML(w io.Writer, text string, words map[string]string)
	ToText(w io.Writer, text string, indent string, preIndent string, width int)
}

Jump to

Keyboard shortcuts

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