NewExecutor creates a new [Executor] and applies the given functional options to it.
(opts ...ExecutorOption)
| 92 | // NewExecutor creates a new [Executor] and applies the given functional options |
| 93 | // to it. |
| 94 | func NewExecutor(opts ...ExecutorOption) *Executor { |
| 95 | e := &Executor{ |
| 96 | Timeout: time.Second * 10, |
| 97 | Stdin: os.Stdin, |
| 98 | Stdout: os.Stdout, |
| 99 | Stderr: os.Stderr, |
| 100 | Logger: nil, |
| 101 | Compiler: nil, |
| 102 | Output: nil, |
| 103 | OutputStyle: ast.Output{}, |
| 104 | TaskSorter: sort.AlphaNumericWithRootTasksFirst, |
| 105 | UserWorkingDir: "", |
| 106 | fuzzyModel: nil, |
| 107 | concurrencySemaphore: nil, |
| 108 | taskCallCount: map[string]*int32{}, |
| 109 | mkdirMutexMap: map[string]*sync.Mutex{}, |
| 110 | executionHashes: map[string]context.Context{}, |
| 111 | executionHashesMutex: sync.Mutex{}, |
| 112 | } |
| 113 | e.Options(opts...) |
| 114 | return e |
| 115 | } |
| 116 | |
| 117 | // Options loops through the given [ExecutorOption] functions and applies them |
| 118 | // to the [Executor]. |
nothing calls this directly
no test coverage detected
searching dependent graphs…