github.com/Benchkram/bob@v0.0.0-20220321080157-7c8f3876e225/bobtask/options.go (about)

     1  package bobtask
     2  
     3  type TaskOption func(t *Task)
     4  
     5  func WithEnvironment(envs []string) TaskOption {
     6  	return func(t *Task) {
     7  		t.env = append(t.env, envs...)
     8  	}
     9  }