@@ -109,7 +109,7 @@ func selectHeaderAccept(accepts []string) string {
109109// contains is a case insenstive match, finding needle in a haystack
110110func contains (haystack []string , needle string ) bool {
111111 for _ , a := range haystack {
112- if strings .ToLower ( a ) == strings . ToLower ( needle ) {
112+ if strings .EqualFold ( a , needle ) {
113113 return true
114114 }
115115 }
@@ -125,7 +125,7 @@ func typeCheckParameter(obj interface{}, expected string, name string) error {
125125
126126 // Check the type is as expected.
127127 if reflect .TypeOf (obj ).String () != expected {
128- return fmt .Errorf ("Expected %s to be of type %s but received %s. " , name , expected , reflect .TypeOf (obj ).String ())
128+ return fmt .Errorf ("expected %s to be of type %s but received %s" , name , expected , reflect .TypeOf (obj ).String ())
129129 }
130130 return nil
131131}
@@ -176,7 +176,7 @@ func (c *APIClient) prepareRequest (
176176
177177 // set custom header
178178 headerParams ["x-aspose-client" ] = "go sdk"
179- headerParams ["x-aspose-client-version" ] = "22.3.0 "
179+ headerParams ["x-aspose-client-version" ] = "22.3.1 "
180180
181181 // Detect postBody type and post.
182182 if postBody != nil {
@@ -195,7 +195,7 @@ func (c *APIClient) prepareRequest (
195195 // add form parameters and file if available.
196196 if len (formParams ) > 0 || (len (fileBytes ) > 0 && fileName != "" ) {
197197 if body != nil {
198- return nil , errors .New ("Cannot specify postBody and multipart form at the same time. " )
198+ return nil , errors .New ("cannot specify postBody and multipart form at the same time" )
199199 }
200200 body = & bytes.Buffer {}
201201 w := multipart .NewWriter (body )
@@ -327,7 +327,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e
327327 }
328328
329329 if bodyBuf .Len () == 0 {
330- err = fmt .Errorf ("Invalid body type %s\n " , contentType )
330+ err = fmt .Errorf ("invalid body type %s" , contentType )
331331 return nil , err
332332 }
333333 return bodyBuf , nil
0 commit comments