NewReader constructs a new Taskfile [Reader] using the given Node and options.
(opts ...ReaderOption)
| 60 | // NewReader constructs a new Taskfile [Reader] using the given Node and |
| 61 | // options. |
| 62 | func NewReader(opts ...ReaderOption) *Reader { |
| 63 | r := &Reader{ |
| 64 | graph: ast.NewTaskfileGraph(), |
| 65 | insecure: false, |
| 66 | download: false, |
| 67 | offline: false, |
| 68 | trustedHosts: nil, |
| 69 | tempDir: os.TempDir(), |
| 70 | cacheExpiryDuration: 0, |
| 71 | debugFunc: nil, |
| 72 | promptFunc: nil, |
| 73 | promptMutex: sync.Mutex{}, |
| 74 | } |
| 75 | r.Options(opts...) |
| 76 | return r |
| 77 | } |
| 78 | |
| 79 | // Options loops through the given [ReaderOption] functions and applies them to |
| 80 | // the [Reader]. |
no test coverage detected
searching dependent graphs…