writers

package
v7.6.4 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package writers 提供了一组实现 io.Writer 接口的结构

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(w ...io.Writer) io.Writer

Types

type SMTP

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

SMTP 实现 io.Writer 接口的邮件发送

func NewSMTP

func NewSMTP(username, password, subject, host string, sendTo []string) *SMTP

NewSMTP 新建 SMTP 对象

username 为smtp 的账号; password 为 smtp 对应的密码; subject 为发送邮件的主题; host 为 smtp 的主机地址,需要带上端口号; sendTo 为接收者的地址。

func (*SMTP) Write

func (s *SMTP) Write(msg []byte) (int, error)

type WriteFunc

type WriteFunc func([]byte) (int, error)

func (WriteFunc) Write

func (f WriteFunc) Write(data []byte) (int, error)

Directories

Path Synopsis
Package rotate 提供一个可以按文件大小进行分割的 io.Writer 实例
Package rotate 提供一个可以按文件大小进行分割的 io.Writer 实例

Jump to

Keyboard shortcuts

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