github.com/octohelm/wagon@v0.0.0-20240308040401-88662650dc0b/pkg/engine/plan/task/print.go (about)

     1  package task
     2  
     3  import (
     4  	"github.com/go-courier/logr"
     5  	"github.com/octohelm/wagon/pkg/engine/plan/task/core"
     6  	"github.com/octohelm/wagon/pkg/logutil"
     7  	"golang.org/x/net/context"
     8  )
     9  
    10  func init() {
    11  	core.DefaultFactory.Register(&Print{})
    12  }
    13  
    14  type Print struct {
    15  	core.Task
    16  	Input any `json:"input"`
    17  }
    18  
    19  func (e *Print) Do(ctx context.Context) error {
    20  	logr.FromContext(ctx).WithValues("input", logutil.CueValue(e.Input)).Info("-")
    21  	return nil
    22  }