typesense/typesense-go hiện có 321 sao trên GitHub, viết chủ yếu bằng Go. Go client for Typesense: https://github.com/typesense/typesense
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
In v2.0.0+, the client allows you to define a document struct to be used type for some of the document operations.
To do that, you've to use typesense.GenericCollection:
type companyDocument struct {
ID string `json:"id"`
CompanyName string `json:"company_name"`
NumEmployees int `json:"num_employees"`
Country string `json:"country"`
}
// doc is a typed document
doc, err := typesense.GenericCollection[*companyDocument](typesenseClient, collectionName).Document("123").Retrieve(context.Background())
Index a document
document := struct {
ID string `json:"id"`
CompanyName string `json:"company_name"`
NumEmployees int `json:"num_employees"`
Country string `json:"country"`
}{
ID: "123",
CompanyName: "Stark Industries",
NumEmployees: 5215,
Country: "USA",
}
client.Collection("companies").Documents().Create(context.Background(), document)
Upserting a document
newDocument := struct {
ID string `json:"id"`
CompanyName string `json:"company_name"`
NumEmployees int `json:"num_employees"`
Country string `json:"country"`
}{
ID: "123",
CompanyName: "Stark Industries",
NumEmployees: 5215,
Country: "USA",
}
client.Collection("companies").Documents().Upsert(context.Background(), newDocument)
Bug reports and pull requests are welcome on GitHub at https://github.com/typesense/typesense-go.
Development Workflow Setup
Install dependencies,
go mod download
Update the generated files,
go generate ./...
Run all tests
# In Windows Powershell
# $env:TYPESENSE_API_KEY="xyz"
# $env:TYPESENSE_URL="http://localhost:8108"
export TYPESENSE_URL="http://localhost:8108"
export TYPESENSE_API_KEY="xyz"
go test ./... -tags=integration -v
License
typesense-go is distributed under the Apache 2 license.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/typesense/typesense-go là nguồn chính thức.
typesense/typesense-go có phải mã nguồn mở không?
Có — typesense/typesense-go phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/typesense/typesense-go.
typesense/typesense-go có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho typesense/typesense-go. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
typesense/typesense-go dùng license gì?
typesense/typesense-go phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
typesense/typesense-go là gì?
typesense/typesense-go (typesense/typesense-go) là dự án Go trên GitHub. Theo mô tả gốc: Go client for Typesense: https://github.com/typesense/typesense
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về typesense-go?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về typesense-go.