genapi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteMarkdown

func WriteMarkdown(w io.Writer, pkg *Package) error

WriteMarkdown writes the API of pkg as markdown to w.

Types

type Field

type Field struct {
	Name     string
	Doc      string
	Type     ast.Expr
	Required bool
}

A Field represents a struct field.

type Package

type Package struct {
	FileSet *token.FileSet
	AstPkg  *ast.Package
	DocPkg  *doc.Package

	Structs map[string]Struct
}

A Package represents a package.

func ParseDir

func ParseDir(path string) (*Package, error)

ParseDir parses the package in the given path.

type Struct

type Struct struct {
	Name   string
	Doc    string
	Fields []Field
}

A Struct represents a struct.

Jump to

Keyboard shortcuts

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