1
1
Fork 0
mirror of https://github.com/mcuadros/ascode synced 2024-05-20 06:26:09 +02:00
ascode/cmd/repl.go

27 lines
584 B
Go
Raw Permalink Normal View History

package cmd
2020-03-30 00:41:24 +02:00
import "github.com/jessevdk/go-flags"
// Command descriptions used in the flags.Parser.AddCommand.
const (
REPLCmdShortDescription = "Run as interactive shell."
2020-03-27 18:33:10 +01:00
REPLCmdLongDescription = REPLCmdShortDescription + "\n\n" +
"The REPL shell provides the same capabilities as the regular `run`\n" +
"command."
)
2020-03-30 00:41:24 +02:00
// REPLCmd implements the command `repl`.
type REPLCmd struct {
commonCmd
}
2020-03-30 00:41:24 +02:00
// Execute honors the flags.Commander interface.
func (c *REPLCmd) Execute(args []string) error {
c.init()
c.runtime.REPL()
return nil
}
2020-03-30 00:41:24 +02:00
var _ flags.Commander = &REPLCmd{}