Documentation ¶
Overview ¶
writer包提供了一组实现io.Writer接口的结构。
Index ¶
Constants ¶
View Source
const Version = "0.3.4.150620"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer 实现对输出内容的缓存,只有输出数量达到指定的值 才会真正地向指定的io.Writer输出。
type Console ¶
type Console struct {
// contains filtered or unexported fields
}
带色彩输出的控制台。
func NewConsole ¶
新建Console实例
out为输出方向,可以是colors.Stderr和colors.Stdout两个值。 foreground,background 为输出文字的前景色和背景色。
type Rotate ¶
type Rotate struct {
// contains filtered or unexported fields
}
可按大小进行分割的文件
import "log" // 每个文件以100M大小进行分割,以日期名作为文件名保存在/var/log下。 f,_ := NewRotate("/var/log", 100*1024*1024) l := log.New(f, "DEBUG", log.LstdFlags)
type Smtp ¶
type Smtp struct {
// contains filtered or unexported fields
}
实现io.Writer接口的邮件发送。
type WriteFlushAdder ¶
io.Writer + Flusher + Adder
Source Files ¶
Click to show internal directories.
Click to hide internal directories.