writer

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FileNameTimeFormat = "2006-01-02"

FileNameTimeFormat 文件名称格式

Functions

This section is empty.

Types

type FileWriter

type FileWriter struct {
	FilenameFunc func(*FileWriter) string
	// contains filtered or unexported fields
}

FileWriter 文件写入结构体

func NewFileWriter

func NewFileWriter(opts ...Option) (*FileWriter, error)

NewFileWriter 实例化FileWriter, 支持大文件分割

func (*FileWriter) Write

func (p *FileWriter) Write(data []byte) (n int, err error)

Write 写入方法

type Option

type Option func(*options)

Option ...

func WithCapOption

func WithCapOption(n uint) Option

WithCapOption ...

func WithPathOption

func WithPathOption(s string) Option

WithPathOption ...

func WithSuffixOption

func WithSuffixOption(s string) Option

WithSuffixOption ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL