Help us shape the future of Go! Take the 2026 Go Developer Survey

command

package
v0.0.0-...-67cc186 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeScript = "script"
	TypeText   = "text"
)

Variables

This section is empty.

Functions

func ParseDir

func ParseDir(path string) map[string]*Command

func ParseFile

func ParseFile(bs []byte) map[string]*Command

Types

type Command

type Command struct {
	Name   string
	Regex  *regexp.Regexp
	Reply  string
	Script *Script
}

func ParseBody

func ParseBody(prefix string, body []byte) *Command

type Script

type Script struct {
	Cmd  string
	Args []string
	File string
}

func (*Script) Exec

func (s *Script) Exec(channel, user, msg string) <-chan string

Jump to

Keyboard shortcuts

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