add basic plugin architecture
This commit is contained in:
32
plugins/rust/main.go
Normal file
32
plugins/rust/main.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"git.front.kjuulh.io/kjuulh/char/pkg/register"
|
||||
)
|
||||
|
||||
type GoCliPlugin struct {
|
||||
}
|
||||
|
||||
func (*GoCliPlugin) About(ctx context.Context) (*register.About, error) {
|
||||
return ®ister.About{
|
||||
Name: "rust",
|
||||
Version: "v0.0.1",
|
||||
About: "golang cli provides a set of actions and presets supporting golang development",
|
||||
}, nil
|
||||
}
|
||||
|
||||
var _ register.Plugin = &GoCliPlugin{}
|
||||
|
||||
func main() {
|
||||
if err := register.
|
||||
NewPluginBuilder(
|
||||
"rust",
|
||||
&GoCliPlugin{},
|
||||
).
|
||||
Serve(context.Background()); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user