(in interface{})
| 491 | } |
| 492 | |
| 493 | func InterfaceToInt64Slice(in interface{}) ([]int64, bool) { |
| 494 | if in == nil { |
| 495 | return nil, true |
| 496 | } |
| 497 | |
| 498 | if intSlice, ok := in.([]int64); ok { |
| 499 | return intSlice, true |
| 500 | } |
| 501 | |
| 502 | inSlice, ok := InterfaceToInterfaceSlice(in) |
| 503 | if !ok { |
| 504 | return nil, false |
| 505 | } |
| 506 | out := make([]int64, len(inSlice)) |
| 507 | |
| 508 | for i, elem := range inSlice { |
| 509 | casted, ok := InterfaceToInt64(elem) |
| 510 | if !ok { |
| 511 | return nil, false |
| 512 | } |
| 513 | out[i] = casted |
| 514 | } |
| 515 | return out, true |
| 516 | } |
| 517 | |
| 518 | func InterfaceToFloat32Slice(in interface{}) ([]float32, bool) { |
| 519 | if in == nil { |
no test coverage detected