command

package
v0.0.0-...-2a0aeb0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Break

func Break(cmd string) (shortCmd string, cmdArgs []string, err error)

*

  • Breaks a given string into a command and its arguments. *
  • Example:
  • Input: foo bar qux *
  • Output:
  • Command: foo
  • args:
  • - bar
  • - qux

func Extract

func Extract(cmdFromUI string) (DBGpCmdName string, err error)

*

  • Given a DBGp command, extract the command name. *
  • For example, if the UI has received "b foo.php 2", which is a shorthand for
  • "breakpoint_set foo.php 2", return "breakpoint_set".

func Prepare

func Prepare(shortCmd string, cmdArgs []string) (DBGpCmd string, err error)

*

  • Turns short commands into full blown DBGp commands. *
  • Example of short command: r
  • Example of corresponding DBGp command: run -i 59

func PrepareDBGpCmd

func PrepareDBGpCmd(cmd string, args []string) (DBGpCmd string, err error)

*

  • Prepare DBGp command from the given values. *
  • The arguments for this function can be considered a short form of the DBGp
  • commands. Here the short forms are expanded to their full forms. *
  • Example: "b /home/foo/php/bar.php 9" becomes
  • "breakpoint_set -i 1 -t line -f /home/foo/php/bar.php -n 9"

func Validate

func Validate(cmd string, args []string) (err error)

*

  • Wrapper for validating any command coming from the interface.

Types

This section is empty.

Jump to

Keyboard shortcuts

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