MCPcopy
hub / github.com/alecthomas/kong / Writers

Function Writers

options.go:215–221  ·  view source on GitHub ↗

Writers overrides the default writers. Useful for testing or interactive use.

(stdout, stderr io.Writer)

Source from the content-addressed store, hash-verified

213
214// Writers overrides the default writers. Useful for testing or interactive use.
215func Writers(stdout, stderr io.Writer) Option {
216 return OptionFunc(func(k *Kong) error {
217 k.Stdout = stdout
218 k.Stderr = stderr
219 return nil
220 })
221}
222
223// Bind binds values for hooks and Run() function arguments.
224//

Callers 15

TestCustomWrapFunction · 0.92
TestMapperPlaceHolderFunction · 0.92
TestSignatureCommandHelpFunction · 0.92
TestHelpOptionalArgsFunction · 0.92
TestHelpFunction · 0.92
TestFlagsLastFunction · 0.92
TestHelpTreeFunction · 0.92
TestHelpCompactNoExpandFunction · 0.92

Calls 1

OptionFuncFuncType · 0.85

Tested by 15

TestCustomWrapFunction · 0.74
TestMapperPlaceHolderFunction · 0.74
TestSignatureCommandHelpFunction · 0.74
TestHelpOptionalArgsFunction · 0.74
TestHelpFunction · 0.74
TestFlagsLastFunction · 0.74
TestHelpTreeFunction · 0.74
TestHelpCompactNoExpandFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…