()
| 10 | ) |
| 11 | |
| 12 | func Example() { |
| 13 | if os.Getenv("ELASTICSEARCH_ADDR") == "" { |
| 14 | fmt.Println("set ELASTICSEARCH_ADDR to run example") |
| 15 | return |
| 16 | } |
| 17 | c := core.New(core.WithInline("log.level", "none")) |
| 18 | c.ProvideEssentials() |
| 19 | c.Provide(otes.Providers()) |
| 20 | c.Invoke(func(esClient *elastic.Client) { |
| 21 | running := esClient.IsRunning() |
| 22 | fmt.Println(running) |
| 23 | }) |
| 24 | // Output: |
| 25 | // true |
| 26 | } |
nothing calls this directly
no test coverage detected