You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
264 B
12 lines
264 B
package response
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// Text makes a textual response
|
|
func Text(writer http.ResponseWriter, status int, data string) {
|
|
writer.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
|
writer.WriteHeader(status)
|
|
writer.Write([]byte(data))
|
|
}
|