MCPcopy Index your code
hub / github.com/aws/aws-lambda-go / Read

Method Read

lambda/runtime_api_client.go:177–189  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

175}
176
177func (r *errorCapturingReader) Read(p []byte) (int, error) {
178 if r.reader == nil {
179 return 0, io.EOF
180 }
181 n, err := r.reader.Read(p)
182 if err != nil && err != io.EOF {
183 lambdaErr := lambdaErrorResponse(err)
184 r.Trailer.Set(trailerLambdaErrorType, lambdaErr.Type)
185 r.Trailer.Set(trailerLambdaErrorBody, base64.StdEncoding.EncodeToString(safeMarshal(lambdaErr)))
186 return 0, io.EOF
187 }
188 return n, err
189}

Callers

nothing calls this directly

Calls 2

lambdaErrorResponseFunction · 0.85
safeMarshalFunction · 0.85

Tested by

no test coverage detected