handlers

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deleter

func Deleter(filePath string, info os.FileInfo, level ...int)

Deleter removes the target file or directory and all of its children

func FindConfigAndRead

func FindConfigAndRead(projectFolder string) (found bool)

func IndentedOutput

func IndentedOutput(info os.FileInfo, action string, level ...int)

func IndentedOutputNoHyph

func IndentedOutputNoHyph(info os.FileInfo, action string, level ...int)

func IsSubjecTo

func IsSubjecTo(subjectedFiles []string, filePath string) bool

IsSubjectTo checks if the given file is subjected to specific action in the changes config

e.g is subjected to skip or delete action

func IsToRead

func IsToRead(ext string) bool

IsToRead checks if ext is provided for modification

func Iterate

func Iterate(filePath string, level ...int)

Iterator iterates the project folder to find the files or directories subjected to changes

func ReadConfig

func ReadConfig(filePath, projectFolder string)

func ReadFile

func ReadFile(path string, info os.FileInfo, level ...int) (content string, ok bool)

func ReadFromInput

func ReadFromInput()

func ReplaceFileContent

func ReplaceFileContent(content string) (newContent string)

func RewriteFile

func RewriteFile(filePath, newContent string, info os.FileInfo, level ...int) (ok bool)

func Run

func Run(projectFolder string)

Run interprets and runs the commands defined in the run field of the config

Types

This section is empty.

Jump to

Keyboard shortcuts

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