(value any)
| 1978 | } |
| 1979 | |
| 1980 | func nullStringForEmpty(value any) any { |
| 1981 | switch typed := value.(type) { |
| 1982 | case memcontract.Scope: |
| 1983 | trimmed := strings.TrimSpace(string(typed)) |
| 1984 | if trimmed == "" { |
| 1985 | return nil |
| 1986 | } |
| 1987 | return trimmed |
| 1988 | case string: |
| 1989 | trimmed := strings.TrimSpace(typed) |
| 1990 | if trimmed == "" { |
| 1991 | return nil |
| 1992 | } |
| 1993 | return trimmed |
| 1994 | default: |
| 1995 | return value |
| 1996 | } |
| 1997 | } |
| 1998 | |
| 1999 | func timeToUnixMillis(value time.Time) int64 { |
| 2000 | if value.IsZero() { |
no outgoing calls