MCPcopy Index your code
hub / github.com/derekbanas/Go-Tutorial / write

Function write

webapp/webapp.go:29–33  ·  view source on GitHub ↗

The writer allows us to write to the browser Create a message and add it to the response that displays in the browser

(writer http.ResponseWriter, msg string)

Source from the content-addressed store, hash-verified

27// Create a message and add it to the
28// response that displays in the browser
29func write(writer http.ResponseWriter, msg string) {
30 // Perform type conversion to bytes
31 _, err := writer.Write([]byte(msg))
32 errorCheck(err)
33}
34
35// request is the request from the browser
36func englishHandler(writer http.ResponseWriter,

Callers 3

englishHandlerFunction · 0.85
spanishHandlerFunction · 0.85
frenchHandlerFunction · 0.85

Calls 1

errorCheckFunction · 0.85

Tested by

no test coverage detected