MCPcopy
hub / github.com/Wei-Shaw/sub2api / WriteString

Method WriteString

backend/internal/handler/ops_error_logger.go:513–523  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

511}
512
513func (w *opsCaptureWriter) WriteString(s string) (int, error) {
514 if w.Status() >= 400 && w.limit > 0 && w.buf.Len() < w.limit {
515 remaining := w.limit - w.buf.Len()
516 if len(s) > remaining {
517 _, _ = w.buf.WriteString(s[:remaining])
518 } else {
519 _, _ = w.buf.WriteString(s)
520 }
521 }
522 return w.ResponseWriter.WriteString(s)
523}
524
525// OpsErrorLoggerMiddleware records error responses (status >= 400) into ops_error_logs.
526//

Callers 15

StringMethod · 0.45
StringMethod · 0.45
StringMethod · 0.45
StringMethod · 0.45
StringMethod · 0.45
StringMethod · 0.45
StringMethod · 0.45
StringMethod · 0.45
StringMethod · 0.45
StringMethod · 0.45
StringMethod · 0.45
StringMethod · 0.45

Calls 2

StatusMethod · 0.45
LenMethod · 0.45