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

Method writeCount

internal/output/writer.go:138–145  ·  view source on GitHub ↗
(data any)

Source from the content-addressed store, hash-verified

136 format := w.EffectiveFormat()
137
138 // An --html run is a person redirecting to a file: the error reads as text on
139 // stderr, as it does on a terminal, rather than as a JSON envelope. Either way the
140 // message and hint may have come from the server, so they are sanitized first.
141 if format == FormatStyled || format == FormatHTML {
142 msg := "Error: " + terminal.Sanitize(e.Message)
143 if e.Hint != "" {
144 msg += "\n" + terminal.Sanitize(e.Hint)
145 }
146 fmt.Fprintln(w.opts.Stderr, msg)
147 return
148 }

Callers 1

OKMethod · 0.95

Calls 2

toSliceFunction · 0.85
ErrUsageFunction · 0.85

Tested by

no test coverage detected