helpers

package
v0.0.0-...-4cbcc9d Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultEngine

func DefaultEngine() *eg.ErrgoEngine

func GetAnalyzerStats

func GetAnalyzerStats(template *eg.CompiledErrorTemplate, exp string, err error) (int, int, error)

func GetDataDirPath

func GetDataDirPath() string

func GetOrInitializeDataDir

func GetOrInitializeDataDir() (string, error)

func SetDataDirPath

func SetDataDirPath(newPath string) error

Types

type AnalyzerResult

type AnalyzerResult struct {
	Template *eg.CompiledErrorTemplate
	Data     *eg.ContextData
	Exp      string // main explanation
	Output   string // full explanation / output
	Err      error
}

func AnalyzeError

func AnalyzeError(engine *eg.ErrgoEngine, workingDir string, msg string) (res AnalyzerResult)

func (AnalyzerResult) Stats

func (res AnalyzerResult) Stats() (int, int, error)

type SharedFS

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

func NewSharedFS

func NewSharedFS() *SharedFS

func (*SharedFS) Open

func (sfs *SharedFS) Open(name string) (fs.File, error)

func (*SharedFS) ReadFile

func (sfs *SharedFS) ReadFile(name string) ([]byte, error)

func (*SharedFS) Remove

func (sfs *SharedFS) Remove(name string) error

func (*SharedFS) WriteFile

func (sfs *SharedFS) WriteFile(name string, content []byte) error

Jump to

Keyboard shortcuts

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