Skip to content

Commit e806a6a

Browse files
authored
Merge pull request #100 from lucasmichot/feature/types
Remove redundant types and cast.
2 parents 69570d3 + 7495ed9 commit e806a6a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func prepareRequestBody(data interface{}) ([]byte, contentType, error) {
210210
default:
211211
b, err := json.Marshal(data)
212212
if err != nil {
213-
return nil, contentType(""), err
213+
return nil, "", err
214214
}
215215

216216
return b, contentTypeJSON, nil

conversation/conversation_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,17 @@ func TestStartHSM(t *testing.T) {
126126
Code: "en_US",
127127
},
128128
LocalizableParameters: []*HSMLocalizableParameter{
129-
&HSMLocalizableParameter{
129+
{
130130
Default: "Hello!",
131131
},
132-
&HSMLocalizableParameter{
132+
{
133133
Default: "EUR12.34",
134134
Currency: &HSMLocalizableParameterCurrency{
135135
Code: "EUR",
136136
Amount: 12340,
137137
},
138138
},
139-
&HSMLocalizableParameter{
139+
{
140140
Default: "Today",
141141
DateTime: mustParseRFC3339(t, "2018-08-24T11:52:12+00:00"),
142142
},

error_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ func TestError(t *testing.T) {
88
t.Run("Single", func(t *testing.T) {
99
errRes := ErrorResponse{
1010
Errors: []Error{
11-
Error{
11+
{
1212
Code: 42,
1313
Description: "something bad",
1414
Parameter: "foo",
@@ -23,12 +23,12 @@ func TestError(t *testing.T) {
2323
t.Run("Multiple", func(t *testing.T) {
2424
errRes := ErrorResponse{
2525
Errors: []Error{
26-
Error{
26+
{
2727
Code: 42,
2828
Description: "something bad",
2929
Parameter: "foo",
3030
},
31-
Error{
31+
{
3232
Code: 42,
3333
Description: "something else",
3434
Parameter: "foo",

voice/recording_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func TestRecordingGetFile(t *testing.T) {
1212
fileContents := []byte("this is not really a WAV file")
13-
mbClient, stop := testRequest(http.StatusOK, []byte(fileContents))
13+
mbClient, stop := testRequest(http.StatusOK, fileContents)
1414
defer stop()
1515

1616
rec := &Recording{

0 commit comments

Comments
 (0)