()
| 1041 | } |
| 1042 | |
| 1043 | func (s Static) FloatArray() ([]float64, bool) { |
| 1044 | if s.Type != TypeFloatArray { |
| 1045 | return nil, false |
| 1046 | } |
| 1047 | |
| 1048 | if s.valBytes == nil { |
| 1049 | return nil, true |
| 1050 | } |
| 1051 | if len(s.valBytes) == 0 { |
| 1052 | return []float64{}, true |
| 1053 | } |
| 1054 | numFloats := uintptr(len(s.valBytes)) / unsafe.Sizeof(float64(0)) |
| 1055 | return unsafe.Slice((*float64)(unsafe.Pointer(&s.valBytes[0])), numFloats), true |
| 1056 | } |
| 1057 | |
| 1058 | func (s Static) StringArray() ([]string, bool) { |
| 1059 | if s.Type != TypeStringArray { |
no outgoing calls