Official Go client for telesink.com — real-time event tracking.
go get github.com/telesink/telesink-goexport TELESINK_ENDPOINT="https://app.telesink.com/api/v1/sinks/your_sink_token_here/events"To disable (tests/dev):
export TELESINK_DISABLED=trueimport "github.com/telesink/telesink-go"
telesink.Track(telesink.Event{
Event: "User signed up",
Text: "user@example.com",
Emoji: "👤",
Properties: map[string]interface{}{
"user_id": 123,
"plan": "pro",
},
// OccurredAt and IdempotencyKey are auto-filled
})You can override the endpoint per call:
telesink.Track(telesink.Event{
Event: "Job succeeded",
Text: "ProcessUserData",
Endpoint: os.Getenv("TELESINK_ACTIVEJOB_ENDPOINT"),
})MIT (see LICENSE.md).