cmd

package
v0.0.0-...-bf54bcd Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: BSD-3-Clause Imports: 51 Imported by: 0

Documentation

Overview

Package cmd handles the gopls command line. It contains a handler for each of the modes, along with all the flag handling and the command line output format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

Main is the main entry point for the gopls application, called by gopls main. It never returns.

Types

type EditFlags

type EditFlags struct {
	Write    bool `flag:"w,write" help:"write edited content to source files"`
	Preserve bool `flag:"preserve" help:"with -write, make copies of original files"`
	Diff     bool `flag:"d,diff" help:"display diffs instead of edited file content"`
	List     bool `flag:"l,list" help:"display names of edited files"`
}

EditFlags defines flags common to {code{action,lens},format,imports,rename} that control how edits are applied to the client's files.

The type is exported for flag reflection.

The -write, -diff, and -list flags are orthogonal but any of them suppresses the default behavior, which is to print the edited file contents.

type ProfileFlags

type ProfileFlags struct {
	CPU    string `flag:"profile.cpu" help:"write CPU profile to this file"`
	Memory string `flag:"profile.mem" help:"write memory profile to this file"`
	Alloc  string `flag:"profile.alloc" help:"write alloc profile to this file"`
	Trace  string `flag:"profile.trace" help:"write trace log to this file"`
	Block  string `flag:"profile.block" help:"write block profile to this file"`
}

ProfileFlags can be embedded in your application struct to automatically add command line arguments and handling for common profiling methods.

type RemoteFlags

type RemoteFlags struct {
	Remote string `` /* 344-byte string literal not displayed */

	// The following flags are used with -remote=auto mode.
	RemoteDebug         string        `flag:"remote.debug" help:"when used with -remote=auto, the -debug value used to start the daemon"`
	RemoteListenTimeout time.Duration `flag:"remote.listen.timeout" help:"when used with -remote=auto, the -listen.timeout value used to start the daemon"`

	RemoteLogfile string `flag:"remote.logfile" help:"when used with -remote=auto, the -logfile value used to start the daemon"`
}

RemoteFlags defines the set of flags for the forward mode.

Jump to

Keyboard shortcuts

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