wings

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindLevenshtein

func FindLevenshtein(target string, list []string) (string, int)

FindLevenshtein finds a target in a list of strings using levenshtein distance.

func New

func New(server *server.Server, log *logrus.Logger, config Config) *wings

func RegisterDefaults

func RegisterDefaults()

Types

type Argument

type Argument interface {
	Description() string
}

Argument should be implemented on custom command argument types to allow for better cmdline support.

type Config

type Config struct {
	Prefix           string
	Title            string
	RegisterDefaults bool
	MaxSuggestions   uint16
}

func DefaultConfig

func DefaultConfig() Config

type ConsoleSource

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

func (*ConsoleSource) GetLog

func (c *ConsoleSource) GetLog() *logrus.Logger

func (*ConsoleSource) GetServer

func (c *ConsoleSource) GetServer() *server.Server

func (*ConsoleSource) Name

func (c *ConsoleSource) Name() string

func (*ConsoleSource) Position

func (c *ConsoleSource) Position() mgl64.Vec3

func (*ConsoleSource) SendCommandOutput

func (c *ConsoleSource) SendCommandOutput(o *cmd.Output)

func (*ConsoleSource) World

func (c *ConsoleSource) World() *world.World

type Exit

type Exit struct{}

func (Exit) Allow

func (e Exit) Allow(src cmd.Source) bool

func (Exit) Run

func (e Exit) Run(src cmd.Source, o *cmd.Output)

Jump to

Keyboard shortcuts

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