ParameterToString can panic

Let the fmt package help convert the obj to a string.  Previously this could panic if the obj was an int.
This commit is contained in:
keithballdotnet 2016-07-15 14:55:11 +02:00 committed by GitHub
parent bd7904d42a
commit cb547c113a

View File

@ -94,7 +94,7 @@ func (c *APIClient) ParameterToString(obj interface{},collectionFormat string) s
} }
} }
return obj.(string) return fmt.Sprintf("%v", obj)
} }
func prepareRequest(postBody interface{}, func prepareRequest(postBody interface{},