wip: cli
This commit is contained in:
@ -24,10 +24,9 @@ func initApp(ctx context.Context) *nf.App {
|
||||
// for example: app := engine.Group("/api/{project}")
|
||||
app := engine.Group("/api")
|
||||
app.Get("/available", func() nf.HandlerFunc {
|
||||
start := time.Now()
|
||||
return func(c *nf.Ctx) error {
|
||||
now := time.Now()
|
||||
return resp.Resp200(c, nf.Map{"ok": true, "start": start, "now": now, "duration": fmt.Sprint(now.Sub(start))})
|
||||
return resp.Resp200(c, nf.Map{"ok": opt.OK, "start": opt.Start, "now": now, "duration": fmt.Sprint(now.Sub(opt.Start))})
|
||||
}
|
||||
}())
|
||||
|
||||
|
Reference in New Issue
Block a user