Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func DebugFields(fields Field, args ...interface{})
- func DefaultCache(file string) *_Cache
- func Error(args ...interface{})
- func ErrorFields(fields Field, args ...interface{})
- func Fatal(args ...interface{})
- func FatalFields(fields Field, args ...interface{})
- func GetUserHome() string
- func Info(args ...interface{})
- func InfoFields(fields Field, args ...interface{})
- func LogError(msg string, err error)
- func Md5Byte(text []byte, salt ...string) string
- func Md5File(f File) string
- func Md5String(text string, salt ...string) string
- func NewCache(file string, defaultExpiration, cleanupInterval time.Duration) *_Cache
- func Panic(args ...interface{})
- func PanicFields(fields Field, args ...interface{})
- func SetLogLevel(level string)
- func Trace(args ...interface{})
- func TraceFields(fields Field, args ...interface{})
- func UuidEqual(value1 uuid.UUID, value2 uuid.UUID) bool
- func UuidFromByte(input []byte) uuid.UUID
- func UuidFromString(input string) uuid.UUID
- func UuidV1() uuid.UUID
- func UuidV4() uuid.UUID
- func Warn(args ...interface{})
- func WarnFields(fields Field, args ...interface{})
- type Field
- type File
- func (f *File) AbsolutePath() string
- func (f *File) BufWriter(cb func(writer *bufio.Writer, err error))
- func (f *File) CreateFile() bool
- func (f *File) Exists() bool
- func (f *File) Extension() string
- func (f *File) FileName() string
- func (f *File) GetParent() (*File, error)
- func (f *File) IsDir() bool
- func (f *File) IsFile() bool
- func (f *File) MkDir() bool
- func (f *File) MkDirAll() bool
- func (f *File) ReadBytes(cb func(content []byte, err error))
- func (f *File) ReadString(cb func(content string, err error))
- func (f *File) Remove() bool
- func (f *File) Rename(target string) error
- func (f *File) SetFileMode(perm os.FileMode)
- func (f *File) SetFlag(flag int)
- func (f *File) Size() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugFields ¶
func DebugFields(fields Field, args ...interface{})
func DefaultCache ¶ added in v0.0.4
func DefaultCache(file string) *_Cache
DefaultCache 获取一个默认的key-value缓存对象,默认超时5分钟,清理10分钟
func ErrorFields ¶
func ErrorFields(fields Field, args ...interface{})
func FatalFields ¶
func FatalFields(fields Field, args ...interface{})
func InfoFields ¶
func InfoFields(fields Field, args ...interface{})
func PanicFields ¶
func PanicFields(fields Field, args ...interface{})
func SetLogLevel ¶
func SetLogLevel(level string)
func TraceFields ¶
func TraceFields(fields Field, args ...interface{})
func UuidFromByte ¶
func UuidFromString ¶
func WarnFields ¶
func WarnFields(fields Field, args ...interface{})
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File 文件结构体,封装简化操作
func NewFileDefault ¶ added in v0.0.4
NewFileDefault 默认权限获取文件
func (*File) IsFile ¶
===Desc:文件相关=========================================================== IsFile 是否是文件
func (*File) ReadString ¶
ReadString 读取文件字符串
Click to show internal directories.
Click to hide internal directories.