token

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package token defines string tokens, delimiters, and content detection constants.

Index

Constants

View Source
const (
	// Colon is the colon character used as a key-value separator.
	Colon = ":"
	// Comma is the comma character.
	Comma = ","
	// CommaSpace is a comma-space separator for joining lists.
	CommaSpace = ", "
	// Dash is a hyphen used as a timestamp segment separator.
	Dash = "-"
	// KeyValueSep is the equals sign used as a key-value separator in state files.
	KeyValueSep = "="
	// Separator is a Markdown horizontal rule used between sections.
	Separator = "---"
	// Ellipsis is a Markdown ellipsis.
	Ellipsis = "..."
	// DoubleQuote is the ASCII double-quote character.
	DoubleQuote = `"`
	// PeriodSpace is a period-space separator for joining sentences.
	PeriodSpace = ". "
	// SemicolonSpace is a semicolon-space separator for joining clauses.
	SemicolonSpace = "; "
)
View Source
const (
	// CodeFence is the standard Markdown code fence delimiter.
	CodeFence = "```"
	// Backtick is a single backtick character.
	Backtick = "`"
)
View Source
const (
	// HeadingLevelOneStart is the Markdown heading for the first section.
	HeadingLevelOneStart = "# "
	// HeadingLevelTwoStart is the Markdown heading for subsequent sections.
	HeadingLevelTwoStart = "## "
	// HeadingLevelThreeStart is the Markdown heading level three.
	HeadingLevelThreeStart = "### "
)
View Source
const (
	// IconOK is a checkmark indicating a healthy/present item.
	IconOK = "✓"
	// IconEmpty is an open circle indicating an empty/missing item.
	IconEmpty = "○"
	// LineHorizontal is a box-drawing horizontal line for table separators.
	LineHorizontal = "─"
)

Status indicator icons for terminal output.

View Source
const (
	// PrefixHeading is the Markdown heading character used for prefix checks.
	PrefixHeading = "#"
	// PrefixDot is the dot prefix for hidden files and directories.
	PrefixDot = "."
	// PrefixBracket is the opening bracket used for placeholder checks.
	PrefixBracket = "["
	// PrefixListDash is the prefix for a dash list item.
	PrefixListDash = "- "
	// PrefixListStar is the prefix for a star list item.
	PrefixListStar = "* "
	// PrefixComment is the inline comment marker in YAML.
	PrefixComment = "#"
	// PrefixBang is the Markdown image/admonition prefix.
	PrefixBang = "!"
	// PrefixStar is the Markdown emphasis/bold prefix.
	PrefixStar = "*"
)
View Source
const (
	// LinkPrefixParent is the relative link prefix to the parent directory.
	LinkPrefixParent = "../"
	// PrefixHTTP is the scheme prefix for HTTP/HTTPS URLs.
	PrefixHTTP = "http"
	// PrefixProtocolRelative is the protocol-relative URL prefix.
	PrefixProtocolRelative = "//"
)
View Source
const (
	// GlobStar is the wildcard character in glob patterns.
	GlobStar = "*"
	// TemplateBrace is the opening brace in template/placeholder patterns.
	TemplateBrace = "{"
)

Template and glob indicator characters.

View Source
const (
	// TruncateLen is the max display length for task text in compact output.
	TruncateLen = 50
	// TruncateContentLen is the max display length for pending update content.
	TruncateContentLen = 60
)

Display truncation lengths for CLI and MCP output.

View Source
const (
	// NewlineCRLF is the Windows new line.
	//
	// We check NewlineCRLF first, then NewlineLF to handle both formats.
	NewlineCRLF = "\r\n"
	// NewlineLF is Unix new line.
	NewlineLF = "\n"
	// Whitespace is the set of inline whitespace characters (space and tab).
	Whitespace = " \t"
	// Space is a single space character.
	Space = " "
	// Tab is a horizontal tab character.
	Tab = "\t"
)
View Source
const EmDash = "—"

EmDash is the em dash character used as a metadata separator.

View Source
const (
	// MaxSeparatorLen is the maximum length of a line to be considered a
	// Markdown separator (e.g. "---" or "----").
	MaxSeparatorLen = 5
)

Content detection constants.

View Source
const MetaJoin = " " + MiddleDot + " "

MetaJoin is the middle dot separator with surrounding spaces.

View Source
const MetaSeparator = " " + EmDash + " "

MetaSeparator is the em dash separator with surrounding spaces.

View Source
const MiddleDot = "·"

MiddleDot is the middle dot character used as a metadata item separator.

Variables

View Source
var SecretPatterns = []string{
	".env",
	"credentials",
	"secret",
	"api_key",
	"apikey",
	"password",
}

SecretPatterns are filename substrings that indicate potential secret files.

View Source
var TemplateMarkers = []string{
	"YOUR_",
	"<your",
	"{{",
	"REPLACE_",
	"TODO",
	"CHANGEME",
	"FIXME",
}

TemplateMarkers are content substrings that indicate a file is a template.

View Source
var TopicSeparators = []string{MetaSeparator, " " + enDash + " "}

TopicSeparators are the delimiters between a date and topic in session headers (e.g., "2026-01-15 - Fix API").

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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