jsonlog

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendLine

func AppendLine(path string, value interface{}) (int64, error)

AppendLine appends a single JSON-encoded line and returns the resulting file size.

func AppendRawLine

func AppendRawLine(path string, line []byte) (int64, error)

AppendRawLine appends a raw JSON line and returns the resulting file size.

func FileSize

func FileSize(path string) (int64, error)

FileSize returns 0 when the file does not exist.

func ReadJSON

func ReadJSON(path string, dst interface{}) error

ReadJSON reads a JSON sidecar file into dst.

func Scan

func Scan(path string, fn func(line []byte) error) error

Scan walks each non-empty JSONL line in order.

func WriteJSON

func WriteJSON(path string, value interface{}) error

WriteJSON writes a JSON sidecar file atomically enough for local runtime use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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