File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -231,17 +231,26 @@ func (v Value) Emit() string {
231
231
case BOOL :
232
232
return strconv .FormatBool (v .AsBool ())
233
233
case INT64SLICE :
234
- j , _ := json .Marshal (v .asInt64Slice ())
234
+ j , err := json .Marshal (v .asInt64Slice ())
235
+ if err != nil {
236
+ return fmt .Sprintf ("invalid: %v" , v .asInt64Slice ())
237
+ }
235
238
return string (j )
236
239
case INT64 :
237
240
return strconv .FormatInt (v .AsInt64 (), 10 )
238
241
case FLOAT64SLICE :
239
- j , _ := json .Marshal (v .asFloat64Slice ())
242
+ j , err := json .Marshal (v .asFloat64Slice ())
243
+ if err != nil {
244
+ return fmt .Sprintf ("invalid: %v" , v .asFloat64Slice ())
245
+ }
240
246
return string (j )
241
247
case FLOAT64 :
242
248
return fmt .Sprint (v .AsFloat64 ())
243
249
case STRINGSLICE :
244
- j , _ := json .Marshal (v .asStringSlice ())
250
+ j , err := json .Marshal (v .asStringSlice ())
251
+ if err != nil {
252
+ return fmt .Sprintf ("invalid: %v" , v .asStringSlice ())
253
+ }
245
254
return string (j )
246
255
case STRING :
247
256
return v .stringly
You can’t perform that action at this time.
0 commit comments