Go SDK
The official Render25 Go module. Requires Go 1.21 or later. Fully typed with idiomatic error handling.
Installation
bash
go get github.com/render25/render25-goBasic Usage
main.go
package main
import (
"context"
"fmt"
"os"
render25 "github.com/render25/render25-go"
)
func main() {
client := render25.NewClient(os.Getenv("RENDER25_API_KEY"))
result, err := client.Email.Send(context.Background(), render25.SendEmailRequest{
From: "[email protected]",
To: []string{"[email protected]"},
Subject: "Hello from Go",
HTML: "<p>Your first email via Go.</p>",
Text: "Your first email via Go.",
})
if err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1)
}
fmt.Println("Sent:", result.ID)
}Tip
The Go SDK is context-aware. Always pass a context with a timeout to avoid hanging on network issues.
