You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: gopls/doc/commands.md
+53-53Lines changed: 53 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -3,72 +3,65 @@
3
3
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.
4
4
5
5
<!-- BEGIN Commands: DO NOT MANUALLY EDIT THIS SECTION -->
6
-
### **Run go generate**
7
-
Identifier: `gopls.generate`
8
-
9
-
generate runs `go generate` for a given directory.
10
-
11
-
12
-
### **Fill struct**
13
-
Identifier: `gopls.fill_struct`
6
+
### **Add dependency**
7
+
Identifier: `gopls.add_dependency`
14
8
15
-
fill_struct is a gopls command to fill a struct with default
16
-
values.
9
+
add_dependency adds a dependency.
17
10
18
11
19
-
### **Regenerate cgo**
20
-
Identifier: `gopls.regenerate_cgo`
12
+
### **Check for upgrades**
13
+
Identifier: `gopls.check_upgrades`
21
14
22
-
regenerate_cgo regenerates cgo definitions.
15
+
check_upgrades checks for module upgrades.
23
16
24
17
25
-
### **Run test(s)**
26
-
Identifier: `gopls.test`
18
+
### **Extract to function**
19
+
Identifier: `gopls.extract_function`
27
20
28
-
test runs `go test` for a specific test function.
21
+
extract_function extracts statements to a function.
29
22
30
23
31
-
### **Run go mod tidy**
32
-
Identifier: `gopls.tidy`
24
+
### **Extract to variable**
25
+
Identifier: `gopls.extract_variable`
33
26
34
-
tidy runs `go mod tidy` for a module.
27
+
extract_variable extracts an expression to a variable.
35
28
36
29
37
-
### **Update go.sum**
38
-
Identifier: `gopls.update_go_sum`
30
+
### **Fill struct**
31
+
Identifier: `gopls.fill_struct`
39
32
40
-
update_go_sum updates the go.sum file for a module.
33
+
fill_struct is a gopls command to fill a struct with default
34
+
values.
41
35
42
36
43
-
### **Undeclared name**
44
-
Identifier: `gopls.undeclared_name`
37
+
### **Toggle gc_details**
38
+
Identifier: `gopls.gc_details`
45
39
46
-
undeclared_name adds a variable declaration for an undeclared
47
-
name.
40
+
gc_details controls calculation of gc annotations.
48
41
49
42
50
-
### **go get package**
51
-
Identifier: `gopls.go_get_package`
43
+
### **Run go generate**
44
+
Identifier: `gopls.generate`
52
45
53
-
go_get_package runs `go get` to fetch a package.
46
+
generate runs `go generate` for a given directory.
54
47
55
48
56
-
### **Check for upgrades**
57
-
Identifier: `gopls.check_upgrades`
49
+
### **Generate gopls.mod**
50
+
Identifier: `gopls.generate_gopls_mod`
58
51
59
-
check_upgrades checks for module upgrades.
52
+
generate_gopls_mod (re)generates the gopls.mod file.
0 commit comments