parser

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package parser provides error constructors for session transcript parsing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileError

func FileError(path string, cause error) error

FileError wraps a per-file parse failure with the file path.

Parameters:

  • path: the file path that failed to parse.
  • cause: the underlying parse error.

Returns:

  • error: "<path>: <cause>"

func NoMatch

func NoMatch(path string) error

NoMatch returns an error when no parser can handle a file.

Parameters:

  • path: the file path that no parser matched.

Returns:

  • error: "no parser found for file: <path>"

func OpenFile

func OpenFile(cause error) error

OpenFile wraps a session file open failure.

Parameters:

  • cause: the underlying error from opening the file.

Returns:

  • error: "open file: <cause>"

func ParseFile

func ParseFile(path string, cause error) error

ParseFile wraps a failure to parse a file.

Parameters:

  • path: file path that could not be parsed
  • cause: the underlying parse error

Returns:

  • error: "failed to parse <path>: <cause>"

func ReadFile

func ReadFile(cause error) error

ReadFile wraps a session file read failure.

Parameters:

  • cause: the underlying error from reading the file.

Returns:

  • error: "read file: <cause>"

func ScanFile

func ScanFile(cause error) error

ScanFile wraps a session file scan failure.

Parameters:

  • cause: the underlying error from scanning the file.

Returns:

  • error: "scan file: <cause>"

func Unmarshal

func Unmarshal(cause error) error

Unmarshal wraps a JSON unmarshal failure during session parsing.

Parameters:

  • cause: the underlying error from JSON unmarshaling.

Returns:

  • error: "unmarshal: <cause>"

func WalkDir

func WalkDir(cause error) error

WalkDir wraps a directory walk failure during session scanning.

Parameters:

  • cause: the underlying error from filepath.Walk.

Returns:

  • error: "walk directory: <cause>"

Types

This section is empty.

Jump to

Keyboard shortcuts

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