util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HandlerPkgName = "handler"
	ModelPkgName   = "model"
	RepoPkgName    = "repository"
	CachePkgName   = "cache"
)
View Source
const GitUrl = "https://github.com/gofuncchan/ginger.git"
View Source
const ShellToUse = "bash"

Variables

View Source
var (
	Green   = string([]byte{27, 91, 57, 55, 59, 52, 50, 109})
	White   = string([]byte{27, 91, 57, 48, 59, 52, 55, 109})
	Yellow  = string([]byte{27, 91, 57, 48, 59, 52, 51, 109})
	Red     = string([]byte{27, 91, 57, 55, 59, 52, 49, 109})
	Blue    = string([]byte{27, 91, 57, 55, 59, 52, 52, 109})
	Magenta = string([]byte{27, 91, 57, 55, 59, 52, 53, 109})
	Cyan    = string([]byte{27, 91, 57, 55, 59, 52, 54, 109})
	Reset   = string([]byte{27, 91, 48, 109})
)

设置颜色输出

Functions

func CamelString

func CamelString(s string) string

camel string, xx_yy to XxYy

func CheckDirMode

func CheckDirMode() bool

检查目录权限

func ExecShellCommand

func ExecShellCommand(command string) error

func GitClone

func GitClone(appName string) bool

func IsDir

func IsDir(path string) bool

判断目录是否存在

func OutputError

func OutputError(msg string) error

func OutputFail

func OutputFail(msg string) error

func OutputFile

func OutputFile(root, pkgName, module string) (io.Writer, error)

输出

func OutputInfo

func OutputInfo(title, msg string)

func OutputOk

func OutputOk(msg string)

func OutputStep

func OutputStep(msg string)

func OutputWarn

func OutputWarn(msg string)

func SnakeString

func SnakeString(s string) string

snake string, XxYy to xx_yy , XxYY to xx_yy

Types

This section is empty.

Jump to

Keyboard shortcuts

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