mirror of
https://github.com/mcuadros/ascode
synced 2024-11-26 06:01:08 +01:00
27 lines
584 B
Go
27 lines
584 B
Go
package cmd
|
|
|
|
import "github.com/jessevdk/go-flags"
|
|
|
|
// Command descriptions used in the flags.Parser.AddCommand.
|
|
const (
|
|
REPLCmdShortDescription = "Run as interactive shell."
|
|
REPLCmdLongDescription = REPLCmdShortDescription + "\n\n" +
|
|
"The REPL shell provides the same capabilities as the regular `run`\n" +
|
|
"command."
|
|
)
|
|
|
|
// REPLCmd implements the command `repl`.
|
|
type REPLCmd struct {
|
|
commonCmd
|
|
}
|
|
|
|
// Execute honors the flags.Commander interface.
|
|
func (c *REPLCmd) Execute(args []string) error {
|
|
c.init()
|
|
c.runtime.REPL()
|
|
|
|
return nil
|
|
}
|
|
|
|
var _ flags.Commander = &REPLCmd{}
|