(t time.Time)
| 286 | } |
| 287 | |
| 288 | func timeAgo(t time.Time) string { |
| 289 | d := time.Since(t).Truncate(time.Second) |
| 290 | if d < time.Minute { |
| 291 | return fmt.Sprintf("%ds ago", int(d.Seconds())) |
| 292 | } |
| 293 | if d < time.Hour { |
| 294 | return fmt.Sprintf("%dm%ds ago", int(d.Minutes()), int(d.Seconds())%60) |
| 295 | } |
| 296 | return fmt.Sprintf("%dh%dm ago", int(d.Hours()), int(d.Minutes())%60) |
| 297 | } |
| 298 | |
| 299 | func schemaKeys(schema map[string]any) string { |
| 300 | if schema == nil { |
no outgoing calls
no test coverage detected