appdoc

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdDoc = &cli.Command{
	Hidden:    true,
	Name:      "doc",
	Usage:     "show documentation for package or symbol",
	ArgsUsage: "name...",
	Flags: []cli.Flag{
		appbase.MakeFlag_target(),
		appbase.MakeFlag_tags(),
	},
	Action: func(c *cli.Context) error {
		opt := appbase.BuildOptions(c)

		var pkgpath = "."
		var names []string
		if c.Args().Len() > 0 {
			pkgpath = c.Args().First()
		}
		if c.Args().Len() > 1 {
			names = c.Args().Slice()[1:]
		}

		RunDoc(opt.Config(), pkgpath, names...)
		return nil
	},
}

Functions

func RunDoc added in v0.9.0

func RunDoc(cfg *config.Config, pkgpath string, names ...string)

Types

type PkgDoc added in v0.9.0

type PkgDoc struct {
	Prog    *loader.Program
	Consts  []*types.Const
	Types   []*types.TypeName
	Globals []*types.Var
	Funcs   []*types.Func
}

func BuildPkgDoc added in v0.9.0

func BuildPkgDoc(prog *loader.Program) (p *PkgDoc)

func (*PkgDoc) Show added in v0.9.0

func (p *PkgDoc) Show(names ...string)

Jump to

Keyboard shortcuts

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