init
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
fe739c3797
commit
257a78d24a
|
@ -2,6 +2,7 @@ package go_coverter
|
|||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/drone/drone-go/drone"
|
||||
|
@ -16,7 +17,12 @@ func New() converter.Plugin {
|
|||
type plugin struct{}
|
||||
|
||||
func (p *plugin) Convert(ctx context.Context, req *converter.Request) (*drone.Config, error) {
|
||||
fmt.Printf("%+v", *req)
|
||||
resp, err := json.Marshal(req)
|
||||
if err != nil {
|
||||
fmt.Printf("%+v", err)
|
||||
return nil, err
|
||||
}
|
||||
fmt.Printf("%s", string(resp))
|
||||
return &drone.Config{
|
||||
Data: req.Config.Data,
|
||||
}, nil
|
||||
|
|
Loading…
Reference in New Issue