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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址