Documentation
¶
Index ¶
- Variables
- type File
- func (f *File) BaseName() string
- func (f *File) CeilingOffsetByLF(offset int64) (int64, error)
- func (f *File) Close() error
- func (f *File) Dir() string
- func (f *File) Fd() *os.File
- func (f *File) IsSameFile(file string) (bool, error)
- func (f *File) Name() string
- func (f *File) Offset() int64
- func (f *File) Open() (err error)
- func (f *File) Read(p []byte) (int, error)
- func (f *File) ReadAll() (file []byte, err error)
- func (f *File) ReadOneByte(offset int64) ([]byte, error)
- func (f *File) Seek(offset int64) error
- func (f *File) Size() int64
- func (f *File) TrancateOffsetByLF(offset int64) (int64, error)
- func (f *File) Write(p []byte) (int, error)
- type Handler
- type NullRuler
- type Tail
- type TimeRuler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TimeRule time TimeRule *TimeRuler // NullRule null NullRule *NullRuler //Map 时间通配符,用于正则表达式替换 Map = map[string]string{ "%Y": "2006", "%M": "01", "%D": "02", "%h": "15", "%m": "04", "%s": "05", } )
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File file
func (*File) CeilingOffsetByLF ¶
CeilingOffsetByLF 根据offset值,往后计算该行的起始偏移量
func (*File) IsSameFile ¶
IsSameFile IsSameFile
func (*File) ReadOneByte ¶
ReadOneByte read one byte
func (*File) Seek ¶
Seek seek os.SEEK_CUR int = 1 // seek relative to the current offset os.SEEK_SET int = 0 // seek relative to the origin of the file os.SEEK_END int = 2 // seek relative to the end
func (*File) TrancateOffsetByLF ¶
TrancateOffsetByLF 根据offset值,往前计算该行的起始偏移量
Click to show internal directories.
Click to hide internal directories.