MCPcopy Create free account
hub / github.com/BryanMwangi/pine / SendString

Method SendString

pine.go:647–650  ·  view source on GitHub ↗

SendString writes a plain-text string to the response.

(body string)

Source from the content-addressed store, hash-verified

645
646// SendString writes a plain-text string to the response.
647func (c *Ctx) SendString(body string) error {
648 c.Response.Write([]byte(body))
649 return nil
650}
651
652// StatusMessage returns the text for a given HTTP status code.
653func StatusMessage(status int) string {

Callers 15

SendStatusMethod · 0.95
TestAddRoute_ValidMethodFunction · 0.80
TestGetFunction · 0.80
TestPostFunction · 0.80
TestPutFunction · 0.80
TestPatchFunction · 0.80
TestDeleteFunction · 0.80
TestRouter_ExactMatchFunction · 0.80
TestRouter_WithParamsFunction · 0.80
TestRouter_NoMatchFunction · 0.80
TestStart_HTTPServerFunction · 0.80

Calls 1

WriteMethod · 0.45

Tested by 15

TestAddRoute_ValidMethodFunction · 0.64
TestGetFunction · 0.64
TestPostFunction · 0.64
TestPutFunction · 0.64
TestPatchFunction · 0.64
TestDeleteFunction · 0.64
TestRouter_ExactMatchFunction · 0.64
TestRouter_WithParamsFunction · 0.64
TestRouter_NoMatchFunction · 0.64
TestStart_HTTPServerFunction · 0.64