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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/drone/drone-go/drone"
|
"github.com/drone/drone-go/drone"
|
||||||
|
@ -16,7 +17,12 @@ func New() converter.Plugin {
|
||||||
type plugin struct{}
|
type plugin struct{}
|
||||||
|
|
||||||
func (p *plugin) Convert(ctx context.Context, req *converter.Request) (*drone.Config, error) {
|
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{
|
return &drone.Config{
|
||||||
Data: req.Config.Data,
|
Data: req.Config.Data,
|
||||||
}, nil
|
}, nil
|
||||||
|
|
Loading…
Reference in New Issue