(v any)
| 986 | } |
| 987 | |
| 988 | func stringSliceFromAny(v any) []string { |
| 989 | switch values := v.(type) { |
| 990 | case []string: |
| 991 | return values |
| 992 | case []any: |
| 993 | out := make([]string, 0, len(values)) |
| 994 | for _, value := range values { |
| 995 | if s, ok := value.(string); ok { |
| 996 | out = append(out, s) |
| 997 | } |
| 998 | } |
| 999 | return out |
| 1000 | default: |
| 1001 | return nil |
| 1002 | } |
| 1003 | } |
| 1004 | |
| 1005 | func nowSeconds() float64 { |
| 1006 | return float64(time.Now().UnixNano()) / 1e9 |