Documentation ¶
Index ¶
- func AskForConfirmation(action string) bool
- func CheckErr(err error)
- func Exists(path string) bool
- func GreenColor(s string) string
- func Int64toString(i int64) string
- func InttoString(i int) string
- func IsTerminal(f *os.File) bool
- func PrintifyDockerfile(writer io.Writer, dockerfile []byte)
- func PrintifyJSON(writer io.Writer, v interface{}) error
- func RedColor(s string) string
- func ReturnMsg(ctx *gin.Context, code int, data interface{}, msg string)
- func SliceDelOne(a string, b []string) []string
- func SlicetoString(s []string) string
- func SnowId() (int64, error)
- func StdRun(args ...string)
- func StringtoInt64(s string) int64
- func StringtoSlice(s string) []string
- func StructToSlice(f interface{}) []string
- func WriteToFile(filename string, v interface{}, marshal func(v interface{}) ([]byte, error)) error
- func YellowColor(s string) string
- type IDMgr
- type IGenID
- type Res
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskForConfirmation ¶
askForConfirmation uses Scanln to parse user input. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user. Typically, you should use fmt to print out a question before calling askForConfirmation. E.g. fmt.Println("WARNING: Are you sure? (yes/no)")
func GreenColor ¶
func Int64toString ¶
func InttoString ¶
func IsTerminal ¶
func PrintifyDockerfile ¶ added in v0.0.2
func PrintifyJSON ¶ added in v0.0.2
func SliceDelOne ¶
func SlicetoString ¶
func StringtoInt64 ¶
func StringtoSlice ¶
func StructToSlice ¶
func StructToSlice(f interface{}) []string
func WriteToFile ¶
func YellowColor ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.