file

package
v0.0.0-...-768e1f3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

README

file

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithTime

func WithTime(str string, t ...time.Time) string

WithTime formats string by time.

Types

type File

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

File file impl io.Writer

func New

func New(opts ...Option) *File

New file

func (*File) Init

func (f *File) Init(opts ...Option)

Init init

func (*File) Write

func (f *File) Write(b []byte) (int, error)

type Option

type Option func(*Options)

Option func options

func Dir

func Dir(dir string) Option

Dir dir

func MaxSize

func MaxSize(size int64) Option

MaxSize max size (bytes)

func Path

func Path(path string) Option

Path path

type Options

type Options struct {
	Size int64 // 最大size
	// contains filtered or unexported fields
}

Options options

Jump to

Keyboard shortcuts

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