mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-11 05:48:31 +02:00
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.
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
package snippet
|
||||
|
||||
import "context"
|
||||
import "github.com/qdrant/go-client/qdrant" // @hide
|
||||
|
||||
func Main() {
|
||||
// @hide-start
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
if err != nil { panic(err) }
|
||||
// @hide-end
|
||||
|
||||
client.DeleteAlias(context.Background(), "production_collection")
|
||||
client.CreateAlias(context.Background(), "production_collection", "example_collection")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user