gochatutil

package
v0.0.0-...-d682030 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2017 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error) bool

func CheckErrorAndAct

func CheckErrorAndAct(err error, action ErrCode) bool

CheckErrorAndAct checks if there has been an error and perform the action

func NewMsg

func NewMsg() interface{}

Types

type ErrCode

type ErrCode int
const (
	ERR_CONTINUE ErrCode = iota
	ERR_STOP     ErrCode = iota
)

type MsgPool

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

MsgPool implements a simple message pool

func NewPool

func NewPool() *MsgPool

NewPool creates a new message pool

func (*MsgPool) Get

func (p *MsgPool) Get() *gochat.ChatMessage

Get gets a message from the pool

func (*MsgPool) Rel

func (p *MsgPool) Rel(m *gochat.ChatMessage)

Rel releases a message to the pool

Jump to

Keyboard shortcuts

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