intro

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package intro remembers whether the introduction has been shown.

The whole state is one bit, so a file's existence is the whole store: a database for a boolean would be more machinery than the thing it holds, and the catalog cache and the query history are already the two places where a third would not belong.

It strikes the same bargain they do — every failure is swallowed, because a read-only home directory should cost a note about which keys to press, not the session. It leans one way on purpose: a marker that could not be written leaves the introduction to be shown again, which is a moment's annoyance, where guessing the other way would hide it from the person it is for.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath() (string, error)

DefaultPath returns the on-disk location, alongside the catalog cache, the query history and the directory list.

func MarkSeen

func MarkSeen(path string) error

MarkSeen records that the introduction has been shown.

Writing it twice is what two sessions opened at once do, and is not a failure: the file's existence is the state, and it already exists.

func Seen

func Seen(path string) bool

Seen reports whether the introduction has already been shown.

An empty path is a session that never found a state directory. That is the absence of an answer rather than a yes, so it counts as unseen.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL