Skip to content

Commit

Permalink
appease the linter for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Oct 26, 2024
1 parent cdd0784 commit 070daac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions redis/stub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,22 +448,22 @@ type RESPResponseWriter struct {

// WriteSimpleString writes a redis inline string
func (rw *RESPResponseWriter) WriteSimpleString(s string) {
fmt.Fprintf(rw.writer, "+%s\r\n", inline(s))
_, _ = fmt.Fprintf(rw.writer, "+%s\r\n", inline(s))
}

// WriteError writes a redis 'Error'
func (rw *RESPResponseWriter) WriteError(err error) {
fmt.Fprintf(rw.writer, "-%s\r\n", inline(err.Error()))
_, _ = fmt.Fprintf(rw.writer, "-%s\r\n", inline(err.Error()))
}

// WriteInteger writes an integer
func (rw *RESPResponseWriter) WriteInteger(n int) {
fmt.Fprintf(rw.writer, ":%d\r\n", n)
_, _ = fmt.Fprintf(rw.writer, ":%d\r\n", n)
}

// WriteBulkString writes a bulk string
func (rw *RESPResponseWriter) WriteBulkString(s string) {
fmt.Fprintf(rw.writer, "$%d\r\n%s\r\n", len(s), s)
_, _ = fmt.Fprintf(rw.writer, "$%d\r\n%s\r\n", len(s), s)
}

// WriteArray writes a list of strings (bulk)
Expand All @@ -481,11 +481,11 @@ func (rw *RESPResponseWriter) WriteArray(strs ...string) {

// WriteNull writes a redis Null element
func (rw *RESPResponseWriter) WriteNull() {
fmt.Fprintf(rw.writer, "$-1\r\n")
_, _ = fmt.Fprintf(rw.writer, "$-1\r\n")
}

func (rw *RESPResponseWriter) writeLen(n int) {
fmt.Fprintf(rw.writer, "*%d\r\n", n)
_, _ = fmt.Fprintf(rw.writer, "*%d\r\n", n)
}

func inline(s string) string {
Expand Down

0 comments on commit 070daac

Please sign in to comment.