core

package
v0.0.0-...-76e3a26 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorRed   = outer(cr)
	ColorGreen = outer(cg)
	ColorWhite = outer(cw)
	ColorGray  = outer(cgr)

	BgBlack = outer(bb)
	BgRed   = outer(br)
	BgGreen = outer(bg)

	ColorReset     = outer(rr)
	ColorBold      = outer(rb)
	ColorDim       = outer(rd)
	ColorItalic    = outer(ri)
	ColorStrikeout = outer(rs)
)

Functions

func Build

func Build()

Build performs executing go build of packages.

func FormatSourceCode

func FormatSourceCode(filename string)

func GetDirName

func GetDirName(currentPath string) string

func GetGoPath

func GetGoPath() string

func GetPackagePath

func GetPackagePath(currentPath string) string

func LeftTrim

func LeftTrim(str, chars string) string

LeftTrim trim characters from the left-side of the input. If second argument is empty, it's will be remove leading spaces.

func LogError

func LogError(v interface{})

func LogInfo

func LogInfo(v interface{})

func LogSuccess

func LogSuccess(v interface{})

func NewLogger

func NewLogger()

func RightTrim

func RightTrim(str, chars string) string

RightTrim trim characters from the right-side of the input. If second argument is empty, it's will be remove spaces.

func ToCamelCase

func ToCamelCase(value interface{}) string

ToCamelCase converts from underscore separated form to camel case form. Ex.: my_func => MyFunc

func ToLower

func ToLower(value interface{}) string

ToLower convert the value string into lowercase format.

func ToLowerCamelCase

func ToLowerCamelCase(value interface{}) string

ToLowerCamelCase converts from underscore separated form to lower camel case form. Ex.: my_func => myFunc

func ToString

func ToString(value interface{}) string

ToString convert the input to a string.

func Trim

func Trim(str, chars string) string

Trim trim characters from both sides of the input. If second argument is empty, it's will be remove spaces.

func Watch

func Watch(appname string, paths []string, files []string)

Watch performs initializing fsnotify to watch files on current directory. and trigger to rebuild and restart the packages after some changes has been made on files which that we watch.

Types

type Command

type Command struct {
	Name        string
	Run         func(cmd *Command, arg []string) int
	Info        template.HTML
	Usage       template.HTML
	Flag        flag.FlagSet
	CustomFlags bool
}

Command type of command on ci.

func (*Command) IsRunable

func (c *Command) IsRunable() bool

IsRunable check is this command is can be run.

func (*Command) ShowUsage

func (c *Command) ShowUsage()

ShowUsage print usage of the command.

type DocVal

type DocVal string

func (*DocVal) Set

func (d *DocVal) Set(value string) error

func (*DocVal) String

func (d *DocVal) String() string

type ListOpts

type ListOpts []string

func (*ListOpts) Set

func (opts *ListOpts) Set(value string) error

func (*ListOpts) String

func (opts *ListOpts) String() string

type StubTemplate

type StubTemplate struct {
	AppPath           string
	ProjectPath       string
	PackagePath       string
	PackageName       string
	ModuleName        string
	ModelName         string
	ModelNameSingular string
	ModelNamePlural   string
	TableName         string
}

Jump to

Keyboard shortcuts

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