doc

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

The doc package provides JSON metadata that documents gopls' public interfaces.

Index

Constants

This section is empty.

Variables

View Source
var JSON string

JSON is a JSON encoding of value of type API. The 'gopls api-json' command prints it.

Functions

This section is empty.

Types

type API

type API struct {
	Options   map[string][]*Option
	Lenses    []*Lens
	Analyzers []*Analyzer
	Hints     []*Hint
}

API is a JSON-encodable representation of gopls' public interfaces.

TODO(adonovan): document these data types.

type Analyzer

type Analyzer struct {
	Name    string
	Doc     string // from analysis.Analyzer.Doc ("title: summary\ndescription"; not Markdown)
	URL     string
	Default bool
}

type EnumKey

type EnumKey struct {
	Name    string // in JSON syntax (quoted)
	Doc     string
	Default string
	Status  string // = "" | "advanced" | "experimental" | "deprecated"
}

type EnumKeys

type EnumKeys struct {
	ValueType string
	Keys      []EnumKey
}

type EnumValue

type EnumValue struct {
	Value  string // in JSON syntax (quoted)
	Doc    string // doc comment; always starts with `Value`
	Status string // = "" | "advanced" | "experimental" | "deprecated"
}

type Hint

type Hint struct {
	Name    string
	Doc     string
	Default bool
	Status  string // = "" | "advanced" | "experimental" | "deprecated"
}

type Lens

type Lens struct {
	FileType string // e.g. "Go", "go.mod"
	Lens     string
	Title    string
	Doc      string
	Default  bool
	Status   string // = "" | "advanced" | "experimental" | "deprecated"
}

type Option

type Option struct {
	Name               string
	Type               string // T = bool | string | int | enum | any | []T | map[T]T | time.Duration
	Doc                string
	EnumKeys           EnumKeys
	EnumValues         []EnumValue
	Default            string
	Status             string
	Hierarchy          string
	DeprecationMessage string
}

Directories

Path Synopsis
The generate command updates the following files of documentation:
The generate command updates the following files of documentation:

Jump to

Keyboard shortcuts

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