gotools/gopls/doc/generate/generate.go

func main() {}

// doMain regenerates the output files. On success:
// - if write, it updates them;
// - if !write, it reports whether they would change.
func doMain(write bool) (bool, error) {}

type rewriter

// pkgDir returns the directory corresponding to the import path pkgPath.
func pkgDir(pkgPath string) (string, error) {}

// loadAPI computes the JSON-encodable value that describes gopls'
// interfaces, by a combination of static and dynamic analysis.
func loadAPI() (*doc.API, error) {}

// loadOptions computes a single category of settings by a combination
// of static analysis and reflection over gopls internal types.
func loadOptions(category reflect.Value, optsType types.Object, pkg *packages.Package, hierarchy string) ([]*doc.Option, error) {}

// loadEnums returns a description of gopls' settings enum types based on static analysis.
func loadEnums(pkg *packages.Package) (map[types.Type][]doc.EnumValue, error) {}

func collectEnumKeys(m *types.Map, reflectField reflect.Value, enumValues []doc.EnumValue) ([]doc.EnumKey, error) {}

func formatDefaultFromEnumBoolMap(reflectMap reflect.Value, enumKey string) (string, error) {}

// formatDefault formats the default value into a JSON-like string.
// VS Code exposes settings as JSON, so showing them as JSON is reasonable.
// TODO(rstambler): Reconsider this approach, as the VS Code Go generator now
// marshals to JSON.
func formatDefault(reflectField reflect.Value) (string, error) {}

// valueDoc transforms a docstring documenting an constant identifier to a
// docstring documenting its value.
//
// If doc is of the form "Foo is a bar", it returns '`"fooValue"` is a bar'. If
// doc is non-standard ("this value is a bar"), it returns '`"fooValue"`: this
// value is a bar'.
func valueDoc(name, value, doc string) string {}

// loadLenses combines the syntactic comments from the settings
// package with the default values from settings.DefaultOptions(), and
// returns a list of Code Lens descriptors.
func loadLenses(settingsPkg *packages.Package, defaults map[settings.CodeLensSource]bool) ([]*doc.Lens, error) {}

func loadAnalyzers(m map[string]*settings.Analyzer) []*doc.Analyzer {}

// loadHints derives and returns the inlay hints metadata from the settings.InlayHint type.
func loadHints(settingsPkg *packages.Package) ([]*doc.Hint, error) {}

func lowerFirst(x string) string {}

func fileForPos(pkg *packages.Package, pos token.Pos) (*ast.File, error) {}

func rewriteAPI(_ []byte, api *doc.API) ([]byte, error) {}

type optionsGroup

func rewriteSettings(prevContent []byte, api *doc.API) ([]byte, error) {}

var parBreakRE

func shouldShowEnumKeysInSettings(name string) bool {}

func collectGroups(opts []*doc.Option) []optionsGroup {}

func capitalize(s string) string {}

func rewriteCodeLenses(prevContent []byte, api *doc.API) ([]byte, error) {}

func rewriteAnalyzers(prevContent []byte, api *doc.API) ([]byte, error) {}

func rewriteInlayHints(prevContent []byte, api *doc.API) ([]byte, error) {}

// replaceSection replaces the portion of a file delimited by comments of the form:
//
//	<!-- BEGIN sectionName -->
//	<!-- END section Name -->
func replaceSection(content []byte, sectionName string, replacement []byte) ([]byte, error) {}

type onOff

func (o onOff) String() string {}