cmd

package
v0.0.0-...-1e81d5e Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: BSD-3-Clause Imports: 40 Imported by: 0

Documentation

Overview

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

UFS is a userspace server which exports a filesystem over 9p2000.

By default, it will export / over a TCP on port 5640 under the username of "harvey".

Index

Constants

This section is empty.

Variables

View Source

Functions

func Add

func Add(cmd Cmd)

func Help

func Help(term *term.Terminal) string

func SerialConsole

func SerialConsole(iface *Interface)

Types

type Cmd

type Cmd struct {
	Name    string
	Args    int
	Pattern *regexp.Regexp
	Syntax  string
	Help    string
	Fn      CmdFn
}

type CmdFn

type CmdFn func(iface *Interface, term *term.Terminal, arg []string) (res string, err error)

type Interface

type Interface struct {
	Log *os.File
}

func (*Interface) Exec

func (iface *Interface) Exec(term *term.Terminal, cmd []byte)

func (*Interface) LogFile

func (iface *Interface) LogFile() *os.File

func (*Interface) Terminal

func (iface *Interface) Terminal(term *term.Terminal)

Jump to

Keyboard shortcuts

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