MCPcopy Create free account
hub / github.com/basecamp/hey-cli / writeOK

Function writeOK

internal/cmd/root.go:262–264  ·  view source on GitHub ↗

writeOK wraps writer.OK and always injects statsOption() so every command response includes request stats when --stats is set.

(data any, opts ...output.ResponseOption)

Source from the content-addressed store, hash-verified

260// writeOK wraps writer.OK and always injects statsOption() so every command
261// response includes request stats when --stats is set.
262func writeOK(data any, opts ...output.ResponseOption) error {
263 return writer.OK(data, append(opts, statsOption())...)
264}
265
266func printAgentHelp(cmd *cobra.Command) {
267 info := map[string]any{

Callers 15

runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
newSetupCommandFunction · 0.85
newCommandsCommandFunction · 0.85
runSkillInstallFunction · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
newAuthLoginCommandFunction · 0.85

Calls 2

statsOptionFunction · 0.85
OKMethod · 0.80

Tested by 2

TestWriteOKIncludesStatsFunction · 0.68