Skip to content

Commit 21831c0

Browse files
author
Kotambkar
committed
Added suggested syntactical changes
1 parent e56acfe commit 21831c0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

private/protocol/json/jsonutil/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func buildScalar(v reflect.Value, buf *bytes.Buffer, tag reflect.StructTag, pare
230230

231231
ts, err := protocol.FormatTime(format, converted)
232232
if err != nil {
233-
return fmt.Errorf("%v",err)
233+
return err
234234
}
235235
if format != protocol.UnixTimeFormatName {
236236
ts = `"` + ts + `"`

private/protocol/query/queryutil/queryutil.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name string, ta
259259

260260
t, err := protocol.FormatTime(format, value)
261261
if err != nil {
262-
return fmt.Errorf("%v",err)
262+
return err
263263
}
264-
v.Set(name,t)
264+
v.Set(name, t)
265265
default:
266266
return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name())
267267
}

private/protocol/rest/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error)
329329
format = protocol.ISO8601TimeFormatName
330330
}
331331
}
332-
str,err = protocol.FormatTime(format, value)
332+
str, err = protocol.FormatTime(format, value)
333333
if err != nil {
334-
return "",fmt.Errorf("%v",err)
334+
return "", err
335335
}
336336
case aws.JSONValue:
337337
if len(value) == 0 {

private/protocol/xml/xmlutil/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode, tag refl
285285
}
286286
str, err = protocol.FormatTime(format, converted)
287287
if err != nil {
288-
return fmt.Errorf("%v",err)
288+
return err
289289
}
290290
default:
291291
if value.Kind() != reflect.String {

0 commit comments

Comments
 (0)