entrylog

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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