Documentation ¶
Index ¶
- Constants
- Variables
- func AdaptWildcards(input string) string
- func Base64Decode(value string) ([]byte, error)
- func Base64Encode(value []byte) string
- func Base64Md5(value []byte) string
- func BytesToString(b []byte) string
- func CheckErrorAndExit(err error)
- func Chown(path string) error
- func CompileWildcardInput(input string) (*regexp.Regexp, error)
- func CopyFile(oldpath, newpath string, checkNewpathLength bool) error
- func DoCompress(file *os.File, prefix string, zw *zip.Writer) (int64, error)
- func EnsureDirectory(dir string) (err error)
- func EnterBashMode(additionalTips func(), callback func(value string))
- func FindDirsToDelete(dir string) (dirs []string, err error)
- func FindFiles(folder string, pattern *regexp.Regexp, action func(fileUrl string)) error
- func FindFilesV2(folder string, pattern *regexp.Regexp) ([]string, error)
- func FindMatches(fileUrl string, pattern *regexp.Regexp, action func(groups []string)) error
- func FormatUtcNow(format string) string
- func FormatUtcToRfc1123(t time.Time) string
- func GetArch() string
- func GetBase64Md5(writer io.Writer) string
- func GetCpuNumber() int
- func GetCurrentTimestamp() int64
- func GetHexMd5(writer io.Writer) string
- func GetMd5Writer() io.Writer
- func GetOS() string
- func GetOsPath(path string) (ret string)
- func GetRealPath(path string) (realPath string, realStat os.FileInfo, err error)
- func GetTerminalWidth() (int, error)
- func GetUtcNow() time.Time
- func HasChinese(val string) bool
- func HasCommandPrex(commandArg string) bool
- func HasUnicode(val string) bool
- func Hex(value []byte) string
- func HexMd5(value []byte) string
- func HmacSha1(key, value []byte) []byte
- func HmacSha256(key, value []byte) []byte
- func Home() (string, error)
- func Int64ToString(value int64) string
- func IntToString(value int) string
- func IsDt() bool
- func IsHec() bool
- func IsLinux() bool
- func IsMac() bool
- func IsObsFilePath(path string) bool
- func IsOtc() bool
- func IsWindows() bool
- func MaxFloat64(va, vb float64) float64
- func MaxInt(va, vb int) int
- func MaybeAddTrailingSlash(srckey string) string
- func MaybeDeleteBeginningSlash(srckey string) string
- func MaybeDeleteTrailingSlash(srckey string) string
- func Md5(value []byte) []byte
- func Md5File(fileUrl string) ([]byte, error)
- func MinFloat64(va, vb float64) float64
- func MinInt(va, vb int) int
- func MkdirAll(path string, perm os.FileMode) error
- func NormalizeBytes(size int64) string
- func NormalizeCount(count int64, unit string) string
- func NormalizeFilePath(fileUrl string) string
- func NormalizeFileSize(fileUrl string) string
- func OpenFile(path string, flag int, perm os.FileMode) (*os.File, error)
- func ParseXml(value []byte, result interface{}) error
- func ReadContentLineByFileUrl(fileUrl string) ([]string, error)
- func ReadLine(rd *bufio.Reader) ([]byte, error)
- func Rename(oldpath, newpath string) error
- func RenameFile(oldpath, newpath string) error
- func Round(val float64) (newVal float64)
- func SanitizeInput(input string) string
- func SetCloudType(c string)
- func Str2Timestamp(str string, defaultValue int64) (ts int64, err error)
- func StringToBytes(s string) []byte
- func StringToFloat64(value string, def float64) float64
- func StringToFloat64V2(value string) (float64, error)
- func StringToInt(value string, def int) int
- func StringToInt64(value string, def int64) int64
- func StringToInt64V2(value string) (int64, error)
- func StringToIntV2(value string) (int, error)
- func TransToXml(value interface{}) ([]byte, error)
- func TranslateToFloat64(value string) (float64, error)
- func TranslateToInt64(value string) (int64, error)
- func UseDefaultDownloadPath(args []string) bool
- func Wrap(reader io.Reader, writers ...io.Writer) io.Reader
- type Hint
- type HintV2
- type MapHelper
- type MultiWritersReader
Constants ¶
View Source
const ( OBS_PREFIX = "obs://" COMMAND_CONNECTOR = "-" OBS_PREFIX_LEN = 6 )
Variables ¶
View Source
var CheckBucketStatusError = errors.New("CheckBucketStatusError")
View Source
var ExecutingError = errors.New("ExecutedError")
View Source
var FileNotFoundError = errors.New("FileNotFoundError")
View Source
var InitializingError = errors.New("InitializingError")
View Source
var InterruptedError = errors.New("InterruptedError")
View Source
var InvalidArgsError = errors.New("InvalidArgsError")
View Source
var TaskNotFoundError = errors.New("TaskNotFoundError")
View Source
var UncompeletedError = errors.New("UncompeletedError")
View Source
var UnsupportedError = errors.New("UnsupportedError")
Functions ¶
func AdaptWildcards ¶
func Base64Decode ¶
func Base64Encode ¶
func BytesToString ¶
func CheckErrorAndExit ¶
func CheckErrorAndExit(err error)
func EnsureDirectory ¶
func EnterBashMode ¶
func EnterBashMode(additionalTips func(), callback func(value string))
func FindDirsToDelete ¶
func FindMatches ¶
func FormatUtcNow ¶
func FormatUtcToRfc1123 ¶
func GetBase64Md5 ¶
func GetCpuNumber ¶
func GetCpuNumber() int
func GetCurrentTimestamp ¶
func GetCurrentTimestamp() int64
func GetMd5Writer ¶
func GetTerminalWidth ¶
func HasChinese ¶
func HasCommandPrex ¶
func HasUnicode ¶
func HmacSha256 ¶
func Int64ToString ¶
func IntToString ¶
func IsObsFilePath ¶
func MaxFloat64 ¶
func MaybeAddTrailingSlash ¶
func MinFloat64 ¶
func NormalizeBytes ¶
func NormalizeCount ¶
func NormalizeFilePath ¶
func NormalizeFileSize ¶
func RenameFile ¶
func SanitizeInput ¶
func SetCloudType ¶
func SetCloudType(c string)
func StringToBytes ¶
func StringToFloat64 ¶
func StringToFloat64V2 ¶
func StringToInt ¶
func StringToInt64 ¶
func StringToInt64V2 ¶
func StringToIntV2 ¶
func TransToXml ¶
func TranslateToFloat64 ¶
func TranslateToInt64 ¶
func UseDefaultDownloadPath ¶
Types ¶
type Hint ¶
type MultiWritersReader ¶
type MultiWritersReader struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.