summaryrefslogtreecommitdiff
path: root/nex/response.go
blob: 165f161b3d6a1a934eacefc41dd4f184b612d0c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package nex

import (
	"bytes"
	"io"

	"tildegit.org/tjp/sliderule/internal/types"
)

// Response builds a nex Response from an io.Reader.
func Response(body io.Reader) *types.Response {
	return &types.Response{Body: body}
}

// StringResponse builds a nex Response from a string.
func StringResponse(body string) *types.Response {
	return Response(bytes.NewBufferString(body))
}