(in interface{})
| 466 | } |
| 467 | |
| 468 | func InterfaceToInt32Slice(in interface{}) ([]int32, bool) { |
| 469 | if in == nil { |
| 470 | return nil, true |
| 471 | } |
| 472 | |
| 473 | if intSlice, ok := in.([]int32); ok { |
| 474 | return intSlice, true |
| 475 | } |
| 476 | |
| 477 | inSlice, ok := InterfaceToInterfaceSlice(in) |
| 478 | if !ok { |
| 479 | return nil, false |
| 480 | } |
| 481 | out := make([]int32, len(inSlice)) |
| 482 | |
| 483 | for i, elem := range inSlice { |
| 484 | casted, ok := InterfaceToInt32(elem) |
| 485 | if !ok { |
| 486 | return nil, false |
| 487 | } |
| 488 | out[i] = casted |
| 489 | } |
| 490 | return out, true |
| 491 | } |
| 492 | |
| 493 | func InterfaceToInt64Slice(in interface{}) ([]int64, bool) { |
| 494 | if in == nil { |
no test coverage detected