Files
landing_page/qdrant-landing/content/documentation/headless/snippets/facet-counts/exact/go.go
T
xzfc 74a785218b Fix type-checking errors in snippets (code only, no .md)
This commit both:
- Fixes pre-existing mistakes in snippets, aka wrong code samples.
- Adds hidden (`@hide`) statements that do not appear in the docs,
  but satisfy typecheckers.
2025-11-28 22:02:07 +00:00

30 lines
527 B
Go

package snippet
// @hide-start
import (
"context"
"github.com/qdrant/go-client/qdrant"
)
// @hide-end
func Main() {
// @hide-start
client, err := qdrant.NewClient(&qdrant.Config{
Host: "localhost",
Port: 6334,
})
if err != nil { panic(err) }
// @hide-end
res, err := client.Facet(context.Background(), &qdrant.FacetCounts{
CollectionName: "{collection_name}",
Key: "key",
Exact: qdrant.PtrOf(true),
})
if err != nil { panic(err) } // @hide
_ = res // @hide
}