Documentation ¶
Index ¶
- Variables
- func DoRequest(method, url string, v interface{}, headers map[string]string) error
- func Fail(str string)
- func GetEnvOrDefault(key, d string) string
- func GetToken() string
- func Info(str string)
- func LogErrPad(err error)
- func LogPad(msg string)
- func LogSuccessPad(msg string)
- func Pad() func()
- func ReadConfig() ([]byte, error)
- func SetToken(tk string)
- func Success(str string)
- func ToMap(s []string) map[string]struct{}
- func WriteConfig(token []byte) error
- type PathStat
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version is app version Version = "v3.2.5" // BaseURL is the base url of gost api services BaseURL = GetEnvOrDefault("GOSTBASEURL", "https://iuao0sjxmi.execute-api.ap-southeast-1.amazonaws.com/development/") // WebURL is the base url of gost web services WebURL = GetEnvOrDefault("GOSTWEBURL", "https://gost.zcong.moe/#/gost/") // MaxSize is single file max size, 30k MaxSize = int64(1024 * 30) // MaxSizeHuman is max size for human MaxSizeHuman = humanize.Bytes(uint64(MaxSize)) // MaxFilesCount is max files count allowed MaxFilesCount = 10 // ErrMaxFilesCount is error message for too many files ErrMaxFilesCount = fmt.Errorf("More than %d files is not allowed ", MaxFilesCount) )
View Source
var ConfigFile string
ConfigFile is the true path of config file `.gostrc`
View Source
var DefaultIgnoreFiles = []string{
".DS_Store",
}
DefaultIgnoreFiles is default ignore file name for folder sub command
View Source
var DefaultIgnoreFolders = []string{
"node_modules",
"vendor",
"bin",
}
DefaultIgnoreFolders is default ignore folders name for folder sub command
Functions ¶
func GetEnvOrDefault ¶
GetEnvOrDefault return a env value or a default if not exists
func GetToken ¶
func GetToken() string
GetToken get token from config file, env or debug token store
func LogSuccessPad ¶
func LogSuccessPad(msg string)
LogErrPad outputs success message with color and pad
Types ¶
Click to show internal directories.
Click to hide internal directories.