Documentation
¶
Index ¶
- Constants
- Variables
- func DFSIter(dir string, cb DFSCallback) map[string]error
- func FileMd5(fn string) (int, string, error)
- func GetLine(url string, lf LineFunc) error
- func HasIndex(target string, match []string) bool
- func ListFiles(dir string, extFilter, nameFilter []string) []string
- func RandEmoji(debug bool) rune
- func RandInt(w int) int32
- func RandStr(w int) string
- func ReadConfig(fn string, conf interface{}) error
- func ReadFile(fn string) ([]byte, error)
- func ReadLine(fn string, lf LineFunc) error
- func TimeStr() string
- func UnixToBJ(unix int64) time.Time
- func UnixToUSPacific(unix int64) time.Time
- func UnixToUTC(unix int64) time.Time
- type CallbackError
- type DFSCallback
- type LineFunc
- type VersionInfo
Constants ¶
View Source
const ( // time format of year month day and hour minute seconds TimeFormatYMDHMS = "2006-01-02T15:04:05" // time format of year month day TimeFormatYMD = "2006-01-02" // time format with time zone TimeFormatYMDHMSZ = "2006-01-02T15:04:05 -0700" )
View Source
const EmojiListLit = `` /* 43350-byte string literal not displayed */
Variables ¶
View Source
var ErrBadFmt = errors.New("bad format")
ErrBadFmt bad format in file
View Source
var ErrDupData = errors.New("dup data")
ErrDupData indicate duplicate data
View Source
var ErrNoSuch = errors.New("no such")
ErrNoSuch not exists
Functions ¶
func ListFiles ¶ added in v1.0.7
ListFiles list all files under directory dir extFilter drops the very extension, nameFilter drops the very names
func ReadConfig ¶
ReadConfig read file to interface
func UnixToUSPacific ¶
UnixToUSPacific unix timestamp to the U.S time
Types ¶
type CallbackError ¶
func (*CallbackError) Error ¶
func (ce *CallbackError) Error() string
func (*CallbackError) Unwrap ¶
func (ce *CallbackError) Unwrap() error
type DFSCallback ¶
DFSIter find every file at a dir and calls cb for every file
type VersionInfo ¶ added in v1.0.14
func Version ¶ added in v1.0.14
func Version() VersionInfo
Click to show internal directories.
Click to hide internal directories.