entrylog

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Marker = "\u001e"

	// Numeric offset so Parse is independent of time.Local (MST abbreviations
	// like PDT are only resolved when Local knows them; CI is usually UTC).
	TimestampLayout = "2006-01-02 03:04:05 PM -0700"
)

Variables

This section is empty.

Functions

func Append

func Append(desc, label, meta, body string, at time.Time,
	tz *time.Location) string

Append adds a block at the end (oldest-first timelines).

func BuildBlock

func BuildBlock(label, meta, body string, at time.Time,
	tz *time.Location) string

func FormatTimestamp

func FormatTimestamp(at time.Time, tz *time.Location) string

func Join

func Join(blocks []Block, tz *time.Location) string

func ParseTimestamp

func ParseTimestamp(s string) (time.Time, error)

func PrependAfterFirst

func PrependAfterFirst(desc, label, meta, body string, at time.Time,
	tz *time.Location) string

PrependAfterFirst inserts a block immediately after the first entry.

func SanitizeText

func SanitizeText(s string) string

func StripMarkers

func StripMarkers(s string) string

Types

type Block

type Block struct {
	Label string
	Meta  string
	Body  string
	At    time.Time
}

Block is one parsed marker-delimited entry.

func Parse

func Parse(desc string) []Block

Jump to

Keyboard shortcuts

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