handler

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(path, name, content string) error

CreateFile ...

func FindCurrentFolder

func FindCurrentFolder() (wd string, hasErr bool)

FindCurrentFolder where command will be executed

func FindEntryPointPath

func FindEntryPointPath() (string, bool)

FindEntryPointPath where main file and DI file located

func FindFilePath

func FindFilePath(root, fileName string, excludeNames []string) (string, error)

FindFilePath looks for fileName in root and all it's subdirectories, returns path of fileName if found.

func Install

func Install(path ...string) error

Install go install something by path

func OverwriteToFile added in v0.2.1

func OverwriteToFile(filePath, content string) error

OverwriteToFile ...

Types

type FindError

type FindError struct {
	FindErrorType
	// Err message
	Err error
}

FindError is an error type specific for search

func (*FindError) Error

func (r *FindError) Error() string

Error to string

func (FindError) IsDuplicateFile

func (r FindError) IsDuplicateFile() bool

IsDuplicateFile file

func (FindError) IsNotFound

func (r FindError) IsNotFound() bool

IsNotFound file

type FindErrorType

type FindErrorType byte

FindErrorType code

const (
	FindErrorFileGeneral FindErrorType = iota
	FindErrorFileNotFound
	FindErrorFileDuplicate
)

Jump to

Keyboard shortcuts

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