cgapp

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Stdout = colorable.NewColorableStdout() // add a colorable std out
	Stderr = colorable.NewColorableStderr() // add a colorable std err
)

Functions

func CalculateDurationTime

func CalculateDurationTime(startTimer time.Time) string

CalculateDurationTime func to calculate duration time.

func CopyFromEmbeddedFS

func CopyFromEmbeddedFS(efs *EmbeddedFileSystem) error

CopyFromEmbeddedFS function for copy files from embedded file system.

func ExecCommand

func ExecCommand(command string, options []string, silentMode bool) error

ExecCommand function to execute a given command.

func GenerateFileFromTemplate

func GenerateFileFromTemplate(fileName string, variables map[string]interface{}) error

GenerateFileFromTemplate func to generate files from templates.

func GitClone

func GitClone(templateType, templateURL string) error

GitClone function for `git clone` defined project template.

func MakeFile

func MakeFile(fileName string, fileData []byte) error

MakeFile function for single file create.

func MakeFolder

func MakeFolder(folderName string) error

MakeFolder function for create folder.

func RemoveFolders

func RemoveFolders(rootFolder string, foldersToRemove []string)

RemoveFolders function for massively remove folders.

func ShowError

func ShowError(text string) error

ShowError function for send error message to output.

func ShowMessage

func ShowMessage(level, text string, startWithNewLine, endWithNewLine bool)

ShowMessage function for showing output messages.

Types

type EmbeddedFileSystem

type EmbeddedFileSystem struct {
	Name       embed.FS
	RootFolder string
	SkipDir    bool
}

EmbeddedFileSystem struct contains embedded file system fields.

Jump to

Keyboard shortcuts

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