golazy.dev golazy.dev / lazydoc Index | Files

package lazydoc

import "golazy.dev/lazydoc"

Types

type Example

type Example struct {
	Name	string	`json:"name"`
	Suffix	string	`json:"suffix,omitempty"`
	Doc	string	`json:"doc,omitempty"`
	Code	string	`json:"code"`
	Output	string	`json:"output,omitempty"`
}

type Func

type Func struct {
	Name		string		`json:"name"`
	Doc		string		`json:"doc"`
	Decl		string		`json:"decl"`
	Examples	[]Example	`json:"examples,omitempty"`
}

type Package

type Package struct {
	ImportPath	string		`json:"import_path"`
	Name		string		`json:"name"`
	Synopsis	string		`json:"synopsis"`
	Doc		string		`json:"doc"`
	Constants	[]Value		`json:"constants,omitempty"`
	Variables	[]Value		`json:"variables,omitempty"`
	Functions	[]Func		`json:"functions,omitempty"`
	Types		[]Type		`json:"types,omitempty"`
	Examples	[]Example	`json:"examples,omitempty"`
}
func LoadPackagesFromDir
func LoadPackagesFromDir(dir, modulePath string) ([]Package, error)
func (p Package) Slug
func (p Package) Slug() string
func (p Package) Symbol
func (p Package) Symbol(name string) (kind string, title string, doc string, decl string, ok bool)

type Type

type Type struct {
	Name		string		`json:"name"`
	Doc		string		`json:"doc"`
	Decl		string		`json:"decl"`
	Constants	[]Value		`json:"constants,omitempty"`
	Variables	[]Value		`json:"variables,omitempty"`
	Funcs		[]Func		`json:"functions,omitempty"`
	Methods		[]Func		`json:"methods,omitempty"`
	Examples	[]Example	`json:"examples,omitempty"`
}

type Value

type Value struct {
	Names	[]string	`json:"names"`
	Doc	string		`json:"doc"`
	Decl	string		`json:"decl"`
}