utilib

package
v0.0.0-...-710a444 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Addslashes

func Addslashes(str string) string

Addslashes Escape single quote and double quote characters from string

func Clearscreen

func Clearscreen()

Clearscreen : Clear console screen

func CmdRunBuffer

func CmdRunBuffer(shellCmd string)

CmdRunBuffer Execute shell command and capture the output into buffer and print out

func CmdRunOnly

func CmdRunOnly(cmdString string)

CmdRunOnly Run console command

func CmdRunProgress

func CmdRunProgress(shellCmd string)

CmdRunProgress Execute shell command with progress

func Command

func Command(cmdString string)

Command Execute command only

func CommandExists

func CommandExists(cmd string) bool

CommandExists Check is command exists and able to be execute

func DeleteArray

func DeleteArray(s []string, index int) []string

DeleteArray Delete array element by index

func DirExists

func DirExists(dirname string) bool

DirExists Checks is dir exists

func Escape

func Escape(s string) string

Escape Escape special characters from string

func FileExists

func FileExists(filename string) bool

FileExists Checks is file exists

func InitConf

func InitConf()

InitConf Creates build.yaml

func Isset

func Isset(arr []string, index int) bool

Isset Is array index key exist

func ReadConf

func ReadConf(path ...string)

ReadConf Read YAML configuration

func Stripslashes

func Stripslashes(str string) string

Stripslashes Put back from Addslashes()

Types

type Configuration

type Configuration struct {
	Command     string
	Execute     string
	File        string
	ProjectName string
	ProjectType string
	Permission  string
	Output      string
	RunOutput   bool
}

Configuration structure

var Conf Configuration

Conf Global variable for to access Configuration

Jump to

Keyboard shortcuts

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