MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / formatTime

Function formatTime

controller/monitor/iml.go:53–63  ·  view source on GitHub ↗
(start string, end string)

Source from the content-addressed store, hash-verified

51}
52
53func 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
65func (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)

Callers 4

ChartRestOverviewMethod · 0.70
ChartAIOverviewMethod · 0.70
AITopNMethod · 0.70
RestTopNMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected