toolsgolang.org/x/tools/internal/lsp/command/commandmeta Index | Files

package commandmeta

import "golang.org/x/tools/internal/lsp/command/commandmeta"

Package commandmeta provides metadata about LSP commands, by analyzing the command.Interface type.

Index

Types

type Command

type Command struct {
	MethodName string
	Name       string
	// TODO(rFindley): I think Title can actually be eliminated. In all cases
	// where we use it, there is probably a more appropriate contextual title.
	Title  string
	Doc    string
	Args   []*Field
	Result *Field
}

func Load

func Load() (*packages.Package, []*Command, error)

func (*Command) ID

func (c *Command) ID() string

type Field

type Field struct {
	Name     string
	Doc      string
	JSONTag  string
	Type     types.Type
	FieldMod string
	// In some circumstances, we may want to recursively load additional field
	// descriptors for fields of struct types, documenting their internals.
	Fields []*Field
}

Source Files

meta.go

Version
v0.1.10
Published
Mar 15, 2022
Platform
js/wasm
Imports
10 packages
Last checked
6 hours ago

Tools for package owners.