formatter

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentHelper

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

ContentHelper adapts a content for the gherkin parser to fix everything that is not taking into account in the parser. The transformer records all settings, remove/replace everything that could triggers errors then it restores all settings that need to be restored in the original content

func (*ContentHelper) DetectSettings

func (c *ContentHelper) DetectSettings(content []byte)

DetectSettings stores all settings specifics to the content being processed

func (*ContentHelper) Prepare

func (c *ContentHelper) Prepare(content []byte) []byte

Prepare removes/replaces all settings int the content that would not be handle properly by the gherkin parser

func (*ContentHelper) Restore

func (c *ContentHelper) Restore(content []byte) []byte

Restore used recorded settings to restore all settings from the original content that need to be preserved

type FileManager

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

func NewFileManager

func NewFileManager(indent int) FileManager

func (FileManager) Check added in v1.2.0

func (f FileManager) Check(path string) []interface{}

Check Test file or path. The function must return either []string or []error

func (FileManager) Format

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

func (FileManager) FormatAndReplace

func (f FileManager) FormatAndReplace(path string) []interface{}

FormatAndReplace Format and replace file or path. The function must return either []string or []error

type ProcessFileError

type ProcessFileError struct {
	Message string
	File    string
}

func (ProcessFileError) Error

func (p ProcessFileError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳