(f []float64)
| 739 | } |
| 740 | |
| 741 | func NewStaticFloatArray(f []float64) Static { |
| 742 | if f == nil { |
| 743 | return Static{Type: TypeFloatArray} |
| 744 | } |
| 745 | if len(f) == 0 { |
| 746 | return Static{Type: TypeFloatArray, valBytes: []byte{}} |
| 747 | } |
| 748 | |
| 749 | numBytes := uintptr(len(f)) * unsafe.Sizeof(f[0]) |
| 750 | return Static{ |
| 751 | Type: TypeFloatArray, |
| 752 | valBytes: unsafe.Slice((*byte)(unsafe.Pointer(&f[0])), numBytes), |
| 753 | } |
| 754 | } |
| 755 | |
| 756 | func NewStaticStringArray(s []string) Static { |
| 757 | if s == nil { |
no outgoing calls