MCPcopy Create free account
hub / github.com/golang/appengine / Write

Method Write

internal/api.go:342–351  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

340}
341
342func (c *aeContext) Write(b []byte) (int, error) {
343 if c.outCode == 0 {
344 c.WriteHeader(http.StatusOK)
345 }
346 if len(b) > 0 && !bodyAllowedForStatus(c.outCode) {
347 return 0, http.ErrBodyNotAllowed
348 }
349 c.outBody = append(c.outBody, b...)
350 return len(b), nil
351}
352
353func (c *aeContext) WriteHeader(code int) {
354 if c.outCode != 0 {

Callers 10

handleFunction · 0.45
handleHTTPMiddlewareFunction · 0.45
ServeHTTPMethod · 0.45
TestDelayedLogFlushingFunction · 0.45
TestLogFlushingFunction · 0.45
synthesizeMainFunction · 0.45
processFileFunction · 0.45
diffFunction · 0.45

Calls 2

WriteHeaderMethod · 0.95
bodyAllowedForStatusFunction · 0.70

Tested by 5

ServeHTTPMethod · 0.36
TestDelayedLogFlushingFunction · 0.36
TestLogFlushingFunction · 0.36