File: commands.md

package info (click to toggle)
golang-golang-x-tools 1%3A0.1.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,588 kB
  • sloc: javascript: 2,011; asm: 1,458; sh: 174; yacc: 155; makefile: 21; ansic: 17
file content (104 lines) | stat: -rw-r--r-- 2,089 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Commands

This document describes the LSP-level commands supported by `gopls`. They cannot be invoked directly by users, and all the details are subject to change, so nobody should rely on this information.

<!-- BEGIN Commands: DO NOT MANUALLY EDIT THIS SECTION -->
### **Run go generate**
Identifier: `gopls.generate`

generate runs `go generate` for a given directory.


### **Fill struct**
Identifier: `gopls.fill_struct`

fill_struct is a gopls command to fill a struct with default
values.


### **Regenerate cgo**
Identifier: `gopls.regenerate_cgo`

regenerate_cgo regenerates cgo definitions.


### **Run test(s)**
Identifier: `gopls.test`

test runs `go test` for a specific test function.


### **Run go mod tidy**
Identifier: `gopls.tidy`

tidy runs `go mod tidy` for a module.


### **Update go.sum**
Identifier: `gopls.update_go_sum`

update_go_sum updates the go.sum file for a module.


### **Undeclared name**
Identifier: `gopls.undeclared_name`

undeclared_name adds a variable declaration for an undeclared
name.


### **go get package**
Identifier: `gopls.go_get_package`

go_get_package runs `go get` to fetch a package.


### **Add dependency**
Identifier: `gopls.add_dependency`

add_dependency adds a dependency.


### **Upgrade dependency**
Identifier: `gopls.upgrade_dependency`

upgrade_dependency upgrades a dependency.


### **Remove dependency**
Identifier: `gopls.remove_dependency`

remove_dependency removes a dependency.


### **Run go mod vendor**
Identifier: `gopls.vendor`

vendor runs `go mod vendor` for a module.


### **Extract to variable**
Identifier: `gopls.extract_variable`

extract_variable extracts an expression to a variable.


### **Extract to function**
Identifier: `gopls.extract_function`

extract_function extracts statements to a function.


### **Toggle gc_details**
Identifier: `gopls.gc_details`

gc_details controls calculation of gc annotations.


### **Generate gopls.mod**
Identifier: `gopls.generate_gopls_mod`

generate_gopls_mod (re)generates the gopls.mod file.


<!-- END Commands: DO NOT MANUALLY EDIT THIS SECTION -->