Documentation
¶
Index ¶
Constants ¶
const ( ErrorTypeConnectionTimeout = "connection_timeout" ErrorTypeAuthFailed = "auth_failed" ErrorTypeConfigInvalid = "config_invalid" ErrorTypeFileNotFound = "file_not_found" ErrorTypeServiceError = "service_error" ErrorTypeUserCancelled = "user_cancelled" ErrorTypeUnknown = "unknown" )
Error categories - never log raw error messages (may contain PII)
const NoticeText = `` /* 230-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func CategorizeError ¶ added in v0.1.23
CategorizeError returns a safe category string for an error Never returns the actual error message to avoid leaking PII
func ShowFirstRunNotice ¶ added in v0.1.23
func ShowFirstRunNotice() bool
ShowFirstRunNotice displays the analytics notice on first run Returns true if the notice was shown (and we should track first_run)
Types ¶
type Client ¶ added in v0.1.23
type Client struct {
// contains filtered or unexported fields
}
Client wraps the PostHog client for analytics
func NewClient ¶ added in v0.1.23
func NewClient() *Client
NewClient creates a new analytics client. Returns nil if analytics is disabled.
func (*Client) Alias ¶ added in v0.1.23
Alias connects the anonymous ID to a user ID (call after login)
type Tracker ¶ added in v0.1.23
type Tracker struct {
// contains filtered or unexported fields
}
Tracker handles analytics for a single command execution
func NewTracker ¶ added in v0.1.23
NewTracker creates a tracker for the given command Returns nil if analytics is disabled
func (*Tracker) Close ¶ added in v0.1.23
func (t *Tracker) Close()
Close flushes and closes the analytics client
func (*Tracker) TrackResult ¶ added in v0.1.23
TrackResult records the command result (call after Execute returns)