@@ -63,7 +63,7 @@ func NewBytesResponder(status int, body []byte) Responder {
6363
6464// NewJsonResponse creates an *http.Response with a body that is a json encoded representation of
6565// the given interface{}. Also accepts an http status code.
66- func NewJsonResponse (status int , body interface {}) (* http.Response , error ) {
66+ func NewJsonResponse (status int , body interface {}) (* http.Response , error ) { // nolint: golint
6767 encoded , err := json .Marshal (body )
6868 if err != nil {
6969 return nil , err
@@ -75,7 +75,7 @@ func NewJsonResponse(status int, body interface{}) (*http.Response, error) {
7575
7676// NewJsonResponder creates a Responder from a given body (as an interface{} that is encoded to
7777// json) and status code.
78- func NewJsonResponder (status int , body interface {}) (Responder , error ) {
78+ func NewJsonResponder (status int , body interface {}) (Responder , error ) { // nolint: golint
7979 resp , err := NewJsonResponse (status , body )
8080 if err != nil {
8181 return nil , err
@@ -93,7 +93,7 @@ func NewJsonResponder(status int, body interface{}) (Responder, error) {
9393// "/test/path",
9494// NewJSONResponderOrPanic(200, &MyBody),
9595// )
96- func NewJsonResponderOrPanic (status int , body interface {}) Responder {
96+ func NewJsonResponderOrPanic (status int , body interface {}) Responder { // nolint: golint
9797 responder , err := NewJsonResponder (status , body )
9898 if err != nil {
9999 panic (err )
@@ -103,7 +103,7 @@ func NewJsonResponderOrPanic(status int, body interface{}) Responder {
103103
104104// NewXmlResponse creates an *http.Response with a body that is an xml encoded representation
105105// of the given interface{}. Also accepts an http status code.
106- func NewXmlResponse (status int , body interface {}) (* http.Response , error ) {
106+ func NewXmlResponse (status int , body interface {}) (* http.Response , error ) { // nolint: golint
107107 encoded , err := xml .Marshal (body )
108108 if err != nil {
109109 return nil , err
@@ -115,7 +115,7 @@ func NewXmlResponse(status int, body interface{}) (*http.Response, error) {
115115
116116// NewXmlResponder creates a Responder from a given body (as an interface{} that is encoded to xml)
117117// and status code.
118- func NewXmlResponder (status int , body interface {}) (Responder , error ) {
118+ func NewXmlResponder (status int , body interface {}) (Responder , error ) { // nolint: golint
119119 resp , err := NewXmlResponse (status , body )
120120 if err != nil {
121121 return nil , err
@@ -133,7 +133,7 @@ func NewXmlResponder(status int, body interface{}) (Responder, error) {
133133// "/test/path",
134134// NewXmlResponderOrPanic(200, &MyBody),
135135// )
136- func NewXmlResponderOrPanic (status int , body interface {}) Responder {
136+ func NewXmlResponderOrPanic (status int , body interface {}) Responder { // nolint: golint
137137 responder , err := NewXmlResponder (status , body )
138138 if err != nil {
139139 panic (err )
@@ -160,12 +160,12 @@ type dummyReadCloser struct {
160160func (d * dummyReadCloser ) Read (p []byte ) (n int , err error ) {
161161 n , err = d .body .Read (p )
162162 if err == io .EOF {
163- d .body .Seek (0 , 0 )
163+ d .body .Seek (0 , 0 ) // nolint: errcheck
164164 }
165165 return n , err
166166}
167167
168168func (d * dummyReadCloser ) Close () error {
169- d .body .Seek (0 , 0 )
169+ d .body .Seek (0 , 0 ) // nolint: errcheck
170170 return nil
171171}
0 commit comments