Fix README install command, usage example, and batch defaults#4
Open
LiKang6688 wants to merge 1 commit into
Open
Fix README install command, usage example, and batch defaults#4LiKang6688 wants to merge 1 commit into
LiKang6688 wants to merge 1 commit into
Conversation
Align env var naming with developer docs and correct the default BatchSize to 250. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Updates Readme.md to correct installation and usage instructions so they match the actual Go module import path, current client API usage, and library defaults.
Changes:
- Fixes
go getcommand to use a valid module path (nohttps://scheme). - Updates usage example to consistently use
client.Enqueue, removes unused import, and standardizes env var name toDREAMDATA_API_KEY. - Corrects documented default batch size from 20 to 250 to match
DefaultBatchSizeinconfig.go.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| If you don’t want to batch messages, you can turn batching off by setting the BatchSize option to 1, like so: | ||
| ```go | ||
| c, err := analytics.NewWithConfig(os.Getenv("DREAMDATA_WRITE_KEY"), analytics.Config{BatchSize: 1}) | ||
| client, err := analytics.NewWithConfig(os.Getenv("DREAMDATA_API_KEY"), analytics.Config{BatchSize: 1}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
go get https://...install commandclient.Enqueueconsistently and remove unused importDefaultBatchSizeinconfig.go)DREAMDATA_API_KEY(aligned with developer docs)Test plan
config.godefaultsgo get github.com/dreamdata-io/analytics-goworksMade with Cursor