(start string, end string)
| 51 | } |
| 52 | |
| 53 | func formatTime(start string, end string) (int64, int64, error) { |
| 54 | s, err := strconv.ParseInt(start, 10, 64) |
| 55 | if err != nil { |
| 56 | return 0, 0, fmt.Errorf("parse start time %s error: %w", start, err) |
| 57 | } |
| 58 | e, err := strconv.ParseInt(end, 10, 64) |
| 59 | if err != nil { |
| 60 | return 0, 0, fmt.Errorf("parse end time %s error: %w", end, err) |
| 61 | } |
| 62 | return s, e, nil |
| 63 | } |
| 64 | |
| 65 | func (i *imlMonitorStatisticController) RestTopN(ctx *gin.Context, start string, end string, limit string) ([]*monitor_dto.TopN, []*monitor_dto.TopN, error) { |
| 66 | s, e, err := formatTime(start, end) |
no outgoing calls
no test coverage detected