cli

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommand

func AddCommand(msg common.Message)

Adds a command to logger

func AddGroup

func AddGroup(groupName string, users []string)

Adds group to chatMap

func AddMessage

func AddMessage(msg common.Message)

Formats and adds message to logger

func AddUser

func AddUser(user string)

Adds user to chatMap

func CLIConsole

func CLIConsole(ccChan *lg.ChanChanMessage)

func GetLogger

func GetLogger() *log.Logger

func QuitCLI

func QuitCLI()

Quits CLI

func RemoveUser

func RemoveUser(user string)

Removes user from usermap

func SetCreateConn

func SetCreateConn(f common.CreateConnFunc)

Sets the chat function for creating connection

func SetSendMessage

func SetSendMessage(f common.SendMessageFunc)

Sets the chat function for sending message

func StartCLI

func StartCLI()

Startup function

Types

type Command

type Command struct {
	Regex    *regexp.Regexp
	Command  string
	Desc     string
	Args     string
	Example  []string
	Callback CommandCallback
}

type CommandCallback

type CommandCallback func(line string, args []string)

Jump to

Keyboard shortcuts

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