packer

package
v0.0.0-...-214a605 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPacker

func RegisterPacker(name string, p Packer)

RegisterPacker 注册一个packer. 如果name已存在,则panic

Types

type Packer

type Packer interface {
	Unpack(io.Reader) ([]byte, error)
	Pack(io.Writer, []byte) error
	String() string
}

Packer 定义了一个封包解包器

func MustGetPacker

func MustGetPacker(name string) Packer

MustGetPacker 获取指定名字对应的packer. 若未注册,则panic

Directories

Path Synopsis
plugins

Jump to

Keyboard shortcuts

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