reader

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: AGPL-3.0 Imports: 8 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

Overview

Package reader reads transcript files that Claude Code appends to concurrently.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileID

func FileID(path string) (string, error)

FileID returns a stable identity ("dev:ino" on unix, volume serial + file index on Windows).

func HeadHash

func HeadHash(path string) (hash string, ok bool, err error)

HeadHash returns hex sha256 of the first complete line (without '\n'); ok=false if no complete line yet.

func Open

func Open(path string) (*os.File, error)

Open opens for reading; on Windows with FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE.

func ReadLines

func ReadLines(path string, from int64, maxBytes int) (lines [][]byte, next int64, err error)

ReadLines returns complete lines starting at from, stopping before maxBytes (line bytes plus their '\n') would be exceeded, but always returning the first line if one is complete. next = from + Σ(len+1). A trailing partial line is never returned.

func Snapshot

func Snapshot(path string) (content []byte, hash string, err error)

Snapshot returns the whole content and its hex sha256.

Types

This section is empty.

Jump to

Keyboard shortcuts

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