writer

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 added in v1.0.2

type Option func(*Options)

Option set options

func WithCap added in v1.0.2

func WithCap(n uint) Option

WithCap set cap

func WithPath added in v1.0.2

func WithPath(s string) Option

WithPath set path

func WithSuffix added in v1.0.2

func WithSuffix(s string) Option

WithSuffix set suffix

type Options added in v1.0.2

type Options struct {
	// contains filtered or unexported fields
}

Options 可配置参数

Jump to

Keyboard shortcuts

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