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 types.Type
}

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
	// 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.3
Published
Jun 9, 2021
Platform
darwin/amd64
Imports
10 packages
Last checked
9 hours ago

Tools for package owners.