MCPcopy Create free account
hub / github.com/compozy/agh / decodeContextError

Function decodeContextError

internal/sse/decode.go:124–133  ·  view source on GitHub ↗
(ctxErr error, closeErr <-chan error)

Source from the content-addressed store, hash-verified

122}
123
124func decodeContextError(ctxErr error, closeErr <-chan error) error {
125 select {
126 case err, ok := <-closeErr:
127 if ok && err != nil && !errors.Is(err, io.ErrClosedPipe) {
128 return errors.Join(ctxErr, fmt.Errorf("sse: close body after context cancellation: %w", err))
129 }
130 default:
131 }
132 return ctxErr
133}
134
135func decodeLine(line string, event *Event, dataBuffer *[]byte) (bool, error) {
136 if line == "" {

Callers 1

DecodeFunction · 0.85

Calls 1

IsMethod · 0.45

Tested by

no test coverage detected