Documentation
¶
Overview ¶
Package tour persists the state of the interactive getting-started tour across runs. The state lives next to the first-run marker in the user's config directory, separate from session data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisabledByEnv ¶
DisabledByEnv reports whether the tour offer is suppressed via environment variable (DOCKER_AGENT_NO_TOUR=1 or CAGENT_NO_TOUR=1). An explicit request to run the tour is still honored.
func MarkDone ¶
func MarkDone() error
MarkDone records that the tour was started, so the first-run offer is not shown again.
func MarkNever ¶
func MarkNever() error
MarkNever records that the user never wants to see the tour offer again.
func ShouldOffer ¶
ShouldOffer reports whether the first-run tour offer should be shown: the user has neither taken the tour nor opted out, and no environment variable suppresses it.
Types ¶
type Status ¶
type Status string
Status is the persisted outcome of the first-run tour offer.
const ( // StatusUnanswered means the user has neither started the tour nor // declined it permanently: the first-run offer may be shown. StatusUnanswered Status = "" // StatusDone means the tour was started at least once. StatusDone Status = "done" // StatusNever means the user asked to never be offered the tour again. StatusNever Status = "never" )
func ReadStatus ¶
func ReadStatus() Status
ReadStatus returns the persisted tour status. A missing file, a read error, or unknown content all read as StatusUnanswered.