fix(doc): Correct API reference in Go package documentation#354
fix(doc): Correct API reference in Go package documentation#354KMKoushik merged 3 commits intousesend:mainfrom
Conversation
Updated description to reference the useSend API instead of Unsend API.
|
@rubixvi is attempting to deploy a commit to the kmkoushik's projects Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughRemoved the community SDK Go doc at 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR attempts to correct documentation by changing "Unsend API" to "useSend API" in the Go SDK documentation. However, this change introduces an inconsistency rather than fixing one. The community-maintained Go package is called "Unsend" (not "useSend"), and the description should reference the "Unsend API" provided by this Go package wrapper, not the "useSend API" of the main product.
Changes:
- Updated the description field in the Go SDK documentation frontmatter to change "Unsend API" to "useSend API"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
apps/docs/community-sdk/go.mdx
Outdated
| --- | ||
| title: Go | ||
| description: "The Unsend Go package lets you interact with the Unsend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information." | ||
| description: "The Unsend Go package lets you interact with the useSend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information." |
There was a problem hiding this comment.
This change introduces an inconsistency. The Go package being documented is called "Unsend" (not "useSend"), as evidenced by the package name "github.com/QGeeDev/unsend-go", the environment variables "UNSEND_API_KEY" and "UNSEND_API_URL", and references throughout the documentation to "Unsend package". The description should reference "Unsend API" (the API provided by this Go package) rather than "useSend API" (the main product's API). While the main product is "useSend", this community package is named "Unsend" and provides its own API wrapper. The original text "Unsend API" was correct.
| description: "The Unsend Go package lets you interact with the useSend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information." | |
| description: "The Unsend Go package lets you interact with the Unsend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information." |
Greptile OverviewGreptile SummaryPartially corrected API reference from "Unsend API" to "useSend API" in the Go package description. However, the change is incomplete and creates inconsistencies:
Confidence Score: 4/5
|
apps/docs/community-sdk/go.mdx
Outdated
| --- | ||
| title: Go | ||
| description: "The Unsend Go package lets you interact with the Unsend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information." | ||
| description: "The Unsend Go package lets you interact with the useSend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information." |
There was a problem hiding this comment.
Inconsistent branding within the same sentence - "Unsend Go package" refers to the community package name (unsend-go), while "useSend API" refers to the API. Consider either keeping both as "Unsend" for consistency with the package name throughout the doc, or changing both to "useSend" and noting that the package name differs.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Additional Comments (3)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@apps/docs/community-sdk/go.mdx`:
- Line 3: The document still uses the old brand "Unsend" in multiple places
(e.g., the header string "The Unsend Go package" and occurrences on lines
referencing examples and descriptions), causing inconsistent branding versus
"useSend"; update every literal occurrence of the product name "Unsend" to
"useSend" in apps/docs/community-sdk/go.mdx (search for and replace strings like
"The Unsend Go package", any other "Unsend" mentions at lines
~8,11,15,27,37,44,52,56,60) while leaving host-controlled identifiers unchanged
(do NOT alter the community package name "unsend-go" or any environment variable
names). Ensure capitalization matches the official product name "useSend"
consistently across the file.
Added a issue to the package maintainer. If maintainer isn't actively maintaining the package. Will fork it.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/docs/community-sdk/go.mdx (1)
32-33:⚠️ Potential issue | 🟡 MinorUpdate the default API URL to the current domain.
Line 33 uses the outdated
https://app.unsend.devendpoint. The official useSend API base URL is nowhttps://app.usesend.com/api/. Update the default value to reflect this change:export UNSEND_API_URL="https://app.usesend.com/api" # or your self-hosted URLThe environment variable name
UNSEND_API_URLis correct and can remain unchanged; only the default value needs updating.
🤖 Fix all issues with AI agents
In `@apps/docs/community-sdk/go.mdx`:
- Around line 57-63: The Go example has mixed tabs and spaces in the
SendEmailRequest literal (fields To, From, Subject, Text, Html) causing
misalignment; update the block so all indentation uses tabs consistently
(replace the space-indented lines for Subject and Html with tab indentation to
match the other lines) ensuring the struct literal formatting for
&unsend.SendEmailRequest{ ... } is uniformly tab-indented.
- Line 8: The sentence "This is a community-maintained package and not
maintained by the useSend." contains an extra article; remove "the" so it reads
"This is a community-maintained package and not maintained by useSend." Update
the line in apps/docs/community-sdk/go.mdx accordingly to reference "useSend"
without an article.
apps/docs/community-sdk/go.mdx
Outdated
|
|
||
| <Warning> | ||
| This is a community-maintained package and not maintained by the Unsend. | ||
| This is a community-maintained package and not maintained by the useSend. |
There was a problem hiding this comment.
Grammar: drop "the" before "useSend".
"by the useSend" is grammatically incorrect — "useSend" is a proper noun used without an article.
Proposed fix
- This is a community-maintained package and not maintained by the useSend.
+ This is a community-maintained package and not maintained by useSend.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| This is a community-maintained package and not maintained by the useSend. | |
| This is a community-maintained package and not maintained by useSend. |
🤖 Prompt for AI Agents
In `@apps/docs/community-sdk/go.mdx` at line 8, The sentence "This is a
community-maintained package and not maintained by the useSend." contains an
extra article; remove "the" so it reads "This is a community-maintained package
and not maintained by useSend." Update the line in
apps/docs/community-sdk/go.mdx accordingly to reference "useSend" without an
article.
apps/docs/community-sdk/go.mdx
Outdated
| request := &unsend.SendEmailRequest{ | ||
| To: []string{"youremail@gmail.com"}, | ||
| From: "hello@yourdomain.com", | ||
| Subject: "Unsend test email", | ||
| Text: "hello,\n\nUnsend is the best open source sending platform", | ||
| Html: "<p>hello,</p><p>Unsend is the best open source sending platform</p><p>check out <a href='https://unsend.dev'>unsend.dev</a></p>", | ||
| Subject: "useSend test email", | ||
| Text: "hello,\n\nuseSend is the best open source sending platform", | ||
| Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>", | ||
| } |
There was a problem hiding this comment.
Inconsistent indentation: mixed tabs and spaces in the Go code example.
Lines 60 and 62 use spaces while the surrounding lines (58–59, 61, 63) use tabs. Go conventionally uses tabs, and the visual misalignment will be noticeable in rendered docs.
Proposed fix — use tabs consistently
request := &unsend.SendEmailRequest{
To: []string{"youremail@gmail.com"},
From: "hello@yourdomain.com",
- Subject: "useSend test email",
+ Subject: "useSend test email",
Text: "hello,\n\nuseSend is the best open source sending platform",
- Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>",
+ Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>",
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| request := &unsend.SendEmailRequest{ | |
| To: []string{"youremail@gmail.com"}, | |
| From: "hello@yourdomain.com", | |
| Subject: "Unsend test email", | |
| Text: "hello,\n\nUnsend is the best open source sending platform", | |
| Html: "<p>hello,</p><p>Unsend is the best open source sending platform</p><p>check out <a href='https://unsend.dev'>unsend.dev</a></p>", | |
| Subject: "useSend test email", | |
| Text: "hello,\n\nuseSend is the best open source sending platform", | |
| Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>", | |
| } | |
| request := &unsend.SendEmailRequest{ | |
| To: []string{"youremail@gmail.com"}, | |
| From: "hello@yourdomain.com", | |
| Subject: "useSend test email", | |
| Text: "hello,\n\nuseSend is the best open source sending platform", | |
| Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>", | |
| } |
🤖 Prompt for AI Agents
In `@apps/docs/community-sdk/go.mdx` around lines 57 - 63, The Go example has
mixed tabs and spaces in the SendEmailRequest literal (fields To, From, Subject,
Text, Html) causing misalignment; update the block so all indentation uses tabs
consistently (replace the space-indented lines for Subject and Html with tab
indentation to match the other lines) ensuring the struct literal formatting for
&unsend.SendEmailRequest{ ... } is uniformly tab-indented.
KMKoushik
left a comment
There was a problem hiding this comment.
@rubixvi we now have our i-house sdk, will be nice to add it https://github.com/usesend/usesend-go
- Remove community section until content is ready. - Update Go SDK docs to useSend implementation.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@apps/docs/get-started/go.mdx`:
- Around line 106-126: The example in the client.Contacts.Create call uses a
real personal email ("hey@koushik.dev"); update the usesend.CreateContactPayload
Email field to a clearly fictional placeholder (e.g., "user@example.com") in the
Create invocation so the snippet no longer contains real personal contact data
while leaving client.Contacts.Create, usesend.CreateContactPayload, and the
surrounding error handling (err, apiErr) unchanged.
- Around line 44-53: The example uses the SaaS production URL which is
misleading; update the self-hosted example in the usesend.NewClient call to use
a clearly fictional placeholder (e.g., replace "https://app.usesend.com" with
something like "https://your-usesend.example" or
"https://self-hosted.example.com") so readers know to substitute their own
instance when using usesend.WithBaseURL.
- Line 16: The docs currently reference a non-existent Go package
`github.com/usesend/usesend-go`; update the get-started Go section to either (A)
replace the broken `go get github.com/usesend/usesend-go` line with the
community-maintained alternative `github.com/QGeeDev/unsend-go` and add a short
disclaimer that it is community-maintained (not official), or (B) remove the Go
install instruction entirely and add a one-sentence clarification that only
official TypeScript and Python SDKs are supported; ensure you update any
mentions of `usesend-go` accordingly (search for usesend-go / unsend-go in the
file and adjust text to match the chosen option).
|
|
||
| Install the useSend Go SDK: | ||
| ```bash | ||
| go get github.com/usesend/usesend-go |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if the Go module exists on GitHub and pkg.go.dev
echo "Checking GitHub repository:"
curl -s -L -o /dev/null -w "HTTP Status: %{http_code}\n" "https://github.com/usesend/usesend-go"
echo "Checking pkg.go.dev:"
curl -s -L -o /dev/null -w "HTTP Status: %{http_code}\n" "https://pkg.go.dev/github.com/usesend/usesend-go"Repository: usesend/useSend
Length of output: 141
🌐 Web query:
usesend-go GitHub Go package
💡 Result:
There doesn’t appear to be an official Go module named usesend-go. The Go SDK documented for useSend/Unsend is a community-maintained package:
- Repo / module:
github.com/QGeeDev/unsend-go(community SDK; not maintained by Unsend/useSend) [1] - Install:
go get github.com/QGeeDev/unsend-go[1] - Config: set
UNSEND_API_KEYand (optionally)UNSEND_API_URL, thenunsend.NewClient()and use methods likeSendEmail[1]
If you meant the useSend official SDKs, their open-source repo includes a TypeScript SDK (not Go) [2], and there’s also a Python SDK published as usesend on PyPI [3].
The referenced Go package does not exist in the Go module registry.
The docs reference github.com/usesend/usesend-go, but this package is not published to pkg.go.dev (returns 404) and cannot be installed via go get. useSend does not provide an official Go SDK. If a Go SDK is needed, the community-maintained alternative is github.com/QGeeDev/unsend-go, though this is not officially maintained by useSend. Consider either updating the docs to reference the community package with appropriate disclaimers, or clarifying that only TypeScript and Python SDKs are officially supported.
🤖 Prompt for AI Agents
In `@apps/docs/get-started/go.mdx` at line 16, The docs currently reference a
non-existent Go package `github.com/usesend/usesend-go`; update the get-started
Go section to either (A) replace the broken `go get
github.com/usesend/usesend-go` line with the community-maintained alternative
`github.com/QGeeDev/unsend-go` and add a short disclaimer that it is
community-maintained (not official), or (B) remove the Go install instruction
entirely and add a one-sentence clarification that only official TypeScript and
Python SDKs are supported; ensure you update any mentions of `usesend-go`
accordingly (search for usesend-go / unsend-go in the file and adjust text to
match the chosen option).
| If you are running a self-hosted version of useSend, provide the base URL using `WithBaseURL`. | ||
| ```go | ||
| client, err := usesend.NewClient( | ||
| "us_12345", | ||
| usesend.WithBaseURL("https://app.usesend.com"), | ||
| ) | ||
| if err != nil { | ||
| log.Fatal(err) | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Self-hosted example URL is the SaaS production URL.
Line 48 uses https://app.usesend.com as the self-hosted base URL example, but that's the production SaaS dashboard URL. This will confuse readers into thinking they should point their self-hosted instance at the hosted service.
Use a clearly fictional placeholder instead.
Proposed fix
- usesend.WithBaseURL("https://app.usesend.com"),
+ usesend.WithBaseURL("https://your-usesend-instance.example.com"),🤖 Prompt for AI Agents
In `@apps/docs/get-started/go.mdx` around lines 44 - 53, The example uses the SaaS
production URL which is misleading; update the self-hosted example in the
usesend.NewClient call to use a clearly fictional placeholder (e.g., replace
"https://app.usesend.com" with something like "https://your-usesend.example" or
"https://self-hosted.example.com") so readers know to substitute their own
instance when using usesend.WithBaseURL.
| ```go | ||
| contact, apiErr, err := client.Contacts.Create( | ||
| context.Background(), | ||
| "contactBook_123", | ||
| usesend.CreateContactPayload{ | ||
| Email: "hey@koushik.dev", | ||
| FirstName: "Koushik", | ||
| LastName: "KM", | ||
| }, | ||
| ) | ||
|
|
||
| if err != nil { | ||
| log.Fatal(err) // transport error | ||
| } | ||
|
|
||
| if apiErr != nil { | ||
| log.Fatalf("API error: %s", apiErr.Message) | ||
| } | ||
|
|
||
| log.Printf("Contact ID: %s", contact.ContactID) | ||
| ``` |
There was a problem hiding this comment.
Replace what appears to be a real personal email with a generic placeholder.
hey@koushik.dev (Line 111) looks like a real person's email address carried over from the previous community SDK docs. Documentation examples should use clearly fictional addresses (e.g., user@example.com) to avoid privacy concerns and accidental contact.
Proposed fix
usesend.CreateContactPayload{
- Email: "hey@koushik.dev",
- FirstName: "Koushik",
- LastName: "KM",
+ Email: "user@example.com",
+ FirstName: "Jane",
+ LastName: "Doe",
},🤖 Prompt for AI Agents
In `@apps/docs/get-started/go.mdx` around lines 106 - 126, The example in the
client.Contacts.Create call uses a real personal email ("hey@koushik.dev");
update the usesend.CreateContactPayload Email field to a clearly fictional
placeholder (e.g., "user@example.com") in the Create invocation so the snippet
no longer contains real personal contact data while leaving
client.Contacts.Create, usesend.CreateContactPayload, and the surrounding error
handling (err, apiErr) unchanged.
* Correct API reference in Go package documentation Updated description to reference the useSend API instead of Unsend API. * Update documentation to reflect useSend branding Added a issue to the package maintainer. If maintainer isn't actively maintaining the package. Will fork it. * fix(docs): remove community section and update Go SDK documentation - Remove community section until content is ready. - Update Go SDK docs to useSend implementation.
Updated description to reference the useSend API instead of Unsend API.
Summary by cubic
Replaced the community Go SDK page with an official useSend “Get Started” guide and updated nav; examples use github.com/usesend/usesend-go with API key init, self-hosted base URL, and emails/contacts.
Written for commit 67c7e70. Summary will update on new commits.
Summary by CodeRabbit