Documentation
¶
Index ¶
- func Basename(fp string) string
- func Close(fd *os.File) error
- func Contains(sl []interface{}, v interface{}) bool
- func ContainsInt(sl []int, v int) bool
- func ContainsInt64(sl []int64, v int64) bool
- func ContainsString(sl []string, v string) bool
- func ConvStrToBool(s string) bool
- func ConvStrToFloat(s string) float64
- func ConvStrToInt(s string) int
- func ConvStrToInt64(s string) int64
- func Create(name string) (*os.File, error)
- func Dir(fp string) string
- func DirsUnder(dirPath string) ([]string, error)
- func Download(toFile, url string) error
- func EnsureDir(fp string) error
- func EnsureDirRW(dataDir string) error
- func Ext(fp string) string
- func FileMTime(fp string) (int64, error)
- func FileSize(fp string) (int64, error)
- func FilesUnder(dirPath string) ([]string, error)
- func GetFilePos(LastSQLError string) map[string]string
- func InsureDir(fp string) error
- func IsExist(fp string) bool
- func IsFile(fp string) bool
- func IsIP(ip string) (b bool)
- func Merge(slice1, slice2 []interface{}) (c []interface{})
- func MergeInt(slice1, slice2 []int) (c []int)
- func MergeInt64(slice1, slice2 []int64) (c []int64)
- func MergeString(slice1, slice2 []string) (c []string)
- func MustOpenLogFile(fp string) *os.File
- func ReadLine(r *bufio.Reader) ([]byte, error)
- func RealPath(fp string) (string, error)
- func Remove(name string) error
- func Rename(src string, target string) error
- func SearchFile(filename string, paths ...string) (fullPath string, err error)
- func SelfDir() string
- func SelfPath() string
- func SumFloat64(s []float64) (sum float64)
- func SumInt(s []int) (sum int)
- func SumInt64(s []int64) (sum int64)
- func ToBytes(filePath string) ([]byte, error)
- func ToInt64(filePath string) (int64, error)
- func ToString(filePath string) (string, error)
- func ToTrimString(filePath string) (string, error)
- func ToUint64(filePath string) (uint64, error)
- func UniqueInt(s []int) []int
- func UniqueInt64(s []int64) []int64
- func UniqueString(s []string) []string
- func Unlink(fp string) error
- func WriteBytes(filePath string, b []byte) (int, error)
- func WriteString(filePath string, s string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsInt ¶
func ContainsInt64 ¶
func ContainsString ¶
func ConvStrToBool ¶
func ConvStrToFloat ¶
func ConvStrToInt ¶
func ConvStrToInt64 ¶
func EnsureDirRW ¶
ensure the datadir and make sure it's rw-able
func GetFilePos ¶
func IsExist ¶
IsExist checks whether a file or directory exists. It returns false when the file or directory does not exist.
func IsFile ¶
IsFile checks whether the path is a file, it returns false when it's a directory or does not exist.
func Merge ¶
func Merge(slice1, slice2 []interface{}) (c []interface{})
SliceMerge merges interface slices to one slice.
func MergeInt64 ¶
func MergeString ¶
func MustOpenLogFile ¶
func SearchFile ¶
Search a file in paths. this is often used in search config file in /etc ~/
func SumFloat64 ¶
func ToTrimString ¶
func UniqueInt64 ¶
func UniqueString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.