Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultMaxBodySize is the default maximum size for body content before truncation DefaultMaxBodySize = 2048 // DefaultPreviewSize is the default size of the preview shown for truncated content DefaultPreviewSize = 500 )
Variables ¶
This section is empty.
Functions ¶
func TruncateBody ¶ added in v0.7.0
TruncateBody truncates a string body if it exceeds maxSize. Returns original string if within limit, otherwise returns truncated format: [LARGE_BODY: truncated, size: %d bytes, preview: %s...]
func TruncateBodyDefault ¶ added in v0.7.0
TruncateBodyDefault truncates a string body using default size limits.
Types ¶
type IOLogger ¶
type IOLogger struct {
// contains filtered or unexported fields
}
IOLogger is a wrapper around io.Reader and io.Writer that can be used to log the data being read and written from the underlying streams
func NewIOLogger ¶
NewIOLogger creates a new IOLogger instance
Click to show internal directories.
Click to hide internal directories.