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

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