File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
docs/book/src/plugins/extending Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -156,10 +156,6 @@ func main() {
156156 switch pluginRequest.Command {
157157 case " init" :
158158 response = handleInit (pluginRequest)
159- case " flags" :
160- response = handleFlags (pluginRequest)
161- case " metadata" :
162- response = handleMetadata (pluginRequest)
163159 default :
164160 response = external.PluginResponse {
165161 Command: pluginRequest.Command ,
@@ -174,7 +170,14 @@ func main() {
174170
175171func handleInit (req *external .PluginRequest ) external .PluginResponse {
176172 // Create Rust file with custom markers
177- marker , _ := markers.NewRustMarker (" src/main.rs" , " imports" )
173+ marker , err := markers.NewRustMarker (" src/main.rs" , " imports" )
174+ if err != nil {
175+ return external.PluginResponse {
176+ Command: " init" ,
177+ Error: true ,
178+ ErrorMsgs: []string {fmt.Sprintf (" failed to create Rust marker: %v " , err)},
179+ }
180+ }
178181
179182 fileContent := fmt.Sprintf (` // Generated by Rust Plugin
180183%s
You can’t perform that action at this time.
0 commit comments