Discover Packages
github.com/ebarkie/textcmd
package
module
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Aug 13, 2020
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
README
¶
TextCmd
Go package implementing a simple text command shell and executor.
Usage
See USAGE .
License
Copyright (c) 2020 Eric Barkie. All rights reserved.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
Expand ▾
Collapse ▴
Documentation
¶
Package textcmd implements a simple text command shell and
executor.
Env is the command environment passed to a function.
Arg returns the argument at index i. 0 is the command , 1
is the first argument, 2 is the second, etc. If an argument
does not exist an empty string is returned.
Shell is a text command shell for which commands can be
registered and executed.
Exec attempts to execute the passed string as a command.
Register adds a command to the text command shell. It takes a
a command function and command execution strings.
Source Files
¶
Directories
¶
internal
trie
Package trie implements a simple prefix tree.
Package trie implements a simple prefix tree.
Click to show internal directories.
Click to hide internal directories.