helpers

package
v0.0.0-...-ee59a28 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskAboutError

func AskAboutError(err string, w io.Writer, r io.Reader) bool

AskAboutError Print err to stdout and asking about continue of executing program

func CheckFile

func CheckFile(path string) (string, error)

CheckFile for checking file if if exist. Return full path to file

func ConvertTplToGoFilePath

func ConvertTplToGoFilePath(tplPath string) string

ConvertTplToGoFilePath converting filepath with any extension to go-filepath. Is used for config validation

func CopyDir

func CopyDir(from string, to string) error

CopyDir copy directory recursively

func CopyFile

func CopyFile(from, to string) error

CopyFile copy file to destination

func ExecuteCode

func ExecuteCode(tpl *template.Template, values interface{}, file string) error

ExecuteCode for generation code from template with values to final file

func GetTemplate

func GetTemplate(path string) (*template.Template, error)

GetTemplate for defining template object from file

func PrepareDestination

func PrepareDestination(fileDestination, sampleDestination string) string

PrepareDestination check destination of file. Comparing sample-destination with file-destination for detecting full path to file.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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