@@ -11,6 +11,62 @@ Go++ is a VS Code extension designed to enhance Go development workflow by impro
11
11
- ** Quick Run & Debug** : One-click execution and debugging for main functions with parameter support
12
12
- ** Code Translation** : Multi-engine comment translation for international development teams
13
13
14
+ ![ CodeLens buttons] ( image/README_zh/1744116598456.png )
15
+
16
+ Ⓖ - Generate code button
17
+ Ⓘ - Interface implementation button
18
+ Ⓡ - References button
19
+
20
+ ![ Generate code options] ( image/README_zh/1744117889827.png )
21
+
22
+ Click Ⓖ Generate code button to:
23
+
24
+ 1 . Generate interface methods (interface names can be 🔍 searched, unlike the official tool)
25
+ 2 . Generate struct tags, specifying tag name and format (camelCase or snake_case)
26
+ 3 . Generate options pattern code
27
+ 4 . Generate unit tests
28
+
29
+ ![ Run and debug options] ( image/README_zh/1744116937929.png )
30
+
31
+ * Run - Execute directly using saved parameters
32
+ * Debug - Debug directly using saved parameters
33
+ * Args - Set parameters and save them for Run and Debug operations
34
+
35
+ Go Libraries tree view:
36
+
37
+ ![ Go Libraries tree] ( image/README_zh/1744117411575.png )
38
+
39
+ 1 . When navigating to source code, the relevant file automatically expands
40
+ 2 . Cmd + click on import statements will also automatically expand the corresponding directory
41
+
42
+ Translation feature:
43
+
44
+ ![ Translation feature] ( image/README_zh/1744117722669.png )
45
+
46
+ 1 . Translate selected text (select text then click the lightbulb to choose translation)
47
+ 2 . Automatic comment translation (useful for reading source code, with caching to conserve free translation quotas)
48
+
49
+ Translation configuration:
50
+
51
+ ![ Translation settings] ( image/README_zh/1744118698911.png )
52
+
53
+ Supports Tencent Translator, ByteDance Volcano Translator, Microsoft Translator (unverified), and Google Translate (unverified)
54
+
55
+ For bugs or feature ideas, please provide feedback.
56
+
57
+ Click on the bottom left -> Report Issue -> Brief description -> Authorize GitHub
58
+ This will automatically submit an issue:
59
+
60
+ ![ Report issue] ( image/README_zh/1744118949074.png )
61
+
62
+
63
+ The animation demonstrates the seamless navigation experience:
64
+
65
+ 1 . Starting from a struct implementation and finding which interfaces it implements
66
+ 2 . Navigating from an interface definition to view all its implementing structs
67
+ 3 . Jumping from a method in a struct directly to its corresponding interface method
68
+ 4 . Finding all implementations of an interface method across different structs
69
+
14
70
## Usage
15
71
16
72
### Interface Navigation
@@ -33,16 +89,11 @@ Right-click menu supports operations like tidy, update, and source code download
33
89
| ----------------------------------- | -------------------- |
34
90
| Focus/Exit Go Library | Ctrl(⌘) + Shift + ' |
35
91
| Reveal current dependency in editor | Ctrl(⌘) + Shift + / |
36
- | Collapse Go Library | Ctrl(⌘) + Shift + . |
37
-
38
- ## Code Example
39
-
40
- ``` go
41
- // Interface definition
42
- type Greeter interface {
43
- SayHello () string
44
- SayGoodbye () string
45
- }
92
+ | // Interface definition | |
93
+ | type Greeter interface { | |
94
+ | SayHello() string | |
95
+ | SayGoodbye() string | |
96
+ | } | |
46
97
47
98
// Implementation
48
99
type EnglishGreeter struct{}
@@ -51,6 +102,7 @@ type EnglishGreeter struct{}
51
102
func (g * EnglishGreeter) SayHello() string {
52
103
return "Hello!"
53
104
}
105
+
54
106
```
55
107
56
108
## Requirements
@@ -84,6 +136,7 @@ Go++ is built on these core technologies:
84
136
## Project Structure
85
137
86
138
```
139
+
87
140
gopp/
88
141
├── docs/ # Documentation
89
142
├── resources/ # Icons and resources
95
148
│ ├── pkg/ # Utilities
96
149
│ └── extension.ts # Entry point
97
150
└── test/ # Test files
151
+
98
152
```
99
153
100
154
## Contributing
@@ -104,3 +158,4 @@ Issues and Pull Requests are welcome to improve Go++. For problem reporting, use
104
158
## License
105
159
106
160
MIT
161
+ ```
0 commit comments