Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

Commit d5d3720

Browse files
committed
add NewStatusReply
Signed-off-by: Tom Grennan <[email protected]>
1 parent d497bce commit d5d3720

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

reply.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ type StatusReply struct {
1414
code string
1515
}
1616

17+
func NewStatusReply(code string) *StatusReply {
18+
return &StatusReply{code}
19+
}
20+
1721
func (r *StatusReply) WriteTo(w io.Writer) (int64, error) {
1822
n, err := w.Write([]byte("+" + r.code + "\r\n"))
1923
return int64(n), err

0 commit comments

Comments
 (0)