From 5a1b8d2ca3433104b61bc2c92d0c4e00d9cb7555 Mon Sep 17 00:00:00 2001 From: icechen Date: Tue, 28 Dec 2021 16:31:38 +0800 Subject: [PATCH] init --- go_coverter/go_coverter.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/go_coverter/go_coverter.go b/go_coverter/go_coverter.go index 6d03800..cef8325 100644 --- a/go_coverter/go_coverter.go +++ b/go_coverter/go_coverter.go @@ -3,7 +3,8 @@ package go_coverter import ( "context" "encoding/json" - "fmt" + + "github.com/sirupsen/logrus" "github.com/drone/drone-go/plugin/config" @@ -31,10 +32,10 @@ type plugin struct{} func (p *plugin) Find(ctx context.Context, req *config.Request) (*drone.Config, error) { resp, err := json.Marshal(req) if err != nil { - fmt.Printf("%+v", err) + logrus.Error(err) return nil, err } - fmt.Printf("%s", string(resp)) + logrus.Infof("%s", string(resp)) return &drone.Config{ Data: defaultPipeline, }, nil