jsonreader

package
v0.4.21 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader represents a JSON reader that extracts ptime and status values based on specified keys.

func New

func New(ptimeKey string, statusKeys []string) *Reader

New creates a new Reader instance with the specified ptime key and status keys.

func (*Reader) Parse

func (r *Reader) Parse(data []byte) ([]byte, []byte)

Parse parses the given JSON data and returns the flags, ptime, and status values. It returns axslog.PtimeFlag and axslog.StatusFlag based on the presence of the corresponding keys. If a key is not found or its value is "-", it is skipped. nolint:gocognit

Jump to

Keyboard shortcuts

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