requires.go 318 B

123456789101112131415161718
  1. package ast
  2. import "github.com/go-task/task/v3/internal/deepcopy"
  3. // Requires represents a set of required variables necessary for a task to run
  4. type Requires struct {
  5. Vars []string
  6. }
  7. func (r *Requires) DeepCopy() *Requires {
  8. if r == nil {
  9. return nil
  10. }
  11. return &Requires{
  12. Vars: deepcopy.Slice(r.Vars),
  13. }
  14. }