init
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package go_coverter
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/drone/drone-go/drone"
|
||||
"github.com/drone/drone-go/plugin/converter"
|
||||
)
|
||||
|
||||
// New returns a new conversion plugin.
|
||||
func New() converter.Plugin {
|
||||
return &plugin{}
|
||||
}
|
||||
|
||||
type plugin struct{}
|
||||
|
||||
func (p *plugin) Convert(ctx context.Context, req *converter.Request) (*drone.Config, error) {
|
||||
fmt.Printf("%+v", *req)
|
||||
return &drone.Config{
|
||||
Data: req.Config.Data,
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user