()
| 27 | } |
| 28 | |
| 29 | func Example() { |
| 30 | c := core.Default(core.WithInline("log.level", "none")) |
| 31 | c.Provide(observability.Providers()) |
| 32 | c.Provide( |
| 33 | di.Deps{func() *cron.Cron { |
| 34 | return cron.New(cron.Config{EnableSeconds: true}) |
| 35 | }}, |
| 36 | ) |
| 37 | |
| 38 | c.AddModuleFunc(NewCronModule) |
| 39 | ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) |
| 40 | defer cancel() |
| 41 | |
| 42 | c.Serve(ctx) |
| 43 | // Output: |
| 44 | // I am a cron |
| 45 | } |
nothing calls this directly
no test coverage detected