Documentation ¶
Index ¶
- Variables
- func BoolStatus(b bool) string
- func BoolString(b bool) string
- func BoolYesNo(b bool) string
- func BoxSealAnonymous(base64Pubkey, msg *string) *string
- func CurrentDirBase() string
- func DebugEnv() bool
- func DebugLog(msg ...interface{})
- func ErrCheck(e error)
- func GitRemote(v bool) *[]string
- func GitRemoteExist(name string) bool
- func GitRemoteRemoveAll()
- func JsonIndentSp(baP *[]byte, endl bool) *string
- func Report(data any, title string, skipEmpty bool, singleLine bool)
- func ReportDebug(data any, title string, skipEmpty bool, singleLine bool)
- func ReportSp(data any, title string, skipEmpty bool, singleLine bool) *string
- func ReportStatus(data bool, title string, singleLine bool)
- func StrArrayPtrContain(aP *[]string, sP *string) bool
- func StrArrayPtrPrintln(saP *[]string)
- func StrArrayPtrRemoveEmpty(saP *[]string) *[]string
- func StrPToArrayP(sP *string) *[]string
- type MyCmd
- func GitInit() *MyCmd
- func GitPush(optionsP []string) *MyCmd
- func GitRemoteAdd(name string, git string) *MyCmd
- func GitRemoteRemove(name string) *MyCmd
- func MyCmdRun(name string, argsP *[]string) *MyCmd
- func MyCmdRunWg(name string, argsP *[]string, title *string, wgP *sync.WaitGroup, output bool) *MyCmd
- type ReportT
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug bool = false
debug flag for helper package
Functions ¶
func BoxSealAnonymous ¶
Encrypt msg with public key using nacl box seal anonymous.
Parameter "base64Pubkey" and returning string are base64 encoded.
func CurrentDirBase ¶
func CurrentDirBase() string
func GitRemoteRemoveAll ¶
func GitRemoteRemoveAll()
execute "git remote remove" all git remote using MyCmd
func JsonIndentSp ¶
Json indent *[]byte -> *string
func ReportStatus ¶
func StrArrayPtrContain ¶
func StrArrayPtrRemoveEmpty ¶
Remove empty lines from *[]string
Types ¶
type MyCmd ¶
type MyCmd struct { ArgsP *[]string `json:"ArgsP"` // Command args Name string `json:"Name"` // Command name CmdLn string `json:"CmdLn"` // Out: Command Line Err error `json:"Err"` // Out: run error Stdout bytes.Buffer `json:"Stdout"` // Out: Stdout Stderr bytes.Buffer `json:"Stderr"` // Out: Stderr }
go exec.Cmd wrapper
func GitRemoteAdd ¶
execute "git remote add" using MyCmd
func GitRemoteRemove ¶
execute "git remote remove" using MyCmd
type ReportT ¶
type ReportT struct { Data any `json:"Data"` // Data to be printed Title string `json:"Title"` // Title of print out ModeStatus bool `json:"ModeStatus"` // bool to "OK/Failed" SkipEmpty bool `json:"SkipEmpty"` // Return empty string if Data is empty SingleLine bool `json:"SingleLine"` // No need line after title }
func (*ReportT) StringDebug ¶
Click to show internal directories.
Click to hide internal directories.