MCPcopy Create free account
hub / github.com/go-task/task / WithPromptFunc

Function WithPromptFunc

taskfile/reader.go:194–196  ·  view source on GitHub ↗

WithPromptFunc sets the prompt function to be used by the [Reader]. If set, this function will be called with prompt messages. The function should optionally log the message to the user and return nil if the prompt is accepted and the execution should continue. Otherwise, it should return an error w

(promptFunc PromptFunc)

Source from the content-addressed store, hash-verified

192// and used later when calling the [Reader.Read] method. By default, no prompt
193// function is set and all prompts are automatically accepted.
194func WithPromptFunc(promptFunc PromptFunc) ReaderOption {
195 return &promptFuncOption{promptFunc: promptFunc}
196}
197
198type promptFuncOption struct {
199 promptFunc PromptFunc

Callers 1

readTaskfileMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…