ghokin

package
v3.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdErr

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

CmdErr is thrown when an error occurred when calling a command on an input, both stdout and stderr are stored

func (CmdErr) Error

func (e CmdErr) Error() string

Error outputs both stdout and stderr

type FileManager

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

FileManager handles transformation on feature files

func NewFileManager

func NewFileManager(indent int, aliases map[string]string) FileManager

NewFileManager creates a brand new FileManager, it requires indentation values and aliases defined as a shell commands in comments

func (FileManager) Check

func (f FileManager) Check(path string, extensions []string) []error

Check ensures file or folder is well formatted

func (FileManager) Transform

func (f FileManager) Transform(filename string) ([]byte, error)

Transform formats and applies shell commands on feature file

func (FileManager) TransformAndReplace

func (f FileManager) TransformAndReplace(path string, extensions []string) []error

TransformAndReplace formats and applies shell commands on file or folder and replace the content of files

type ProcessFileError

type ProcessFileError struct {
	Message string
	File    string
}

ProcessFileError is emitted when processing a file trigger an error

func (ProcessFileError) Error

func (p ProcessFileError) Error() string

Error dumps a string error

type StdinManager

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

StdinManager handles transformation from stdin

func NewStdinManager

func NewStdinManager(indent int, aliases map[string]string) StdinManager

NewStdinManager creates a brand new StdinManager, it requires indentation values and aliases defined as a shell commands in comments

func (StdinManager) Transform

func (s StdinManager) Transform(reader io.Reader) ([]byte, error)

Transform formats and applies shell commands on stdin

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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