Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Update mainscript for usage with actual cli-Version #30

Merged
merged 1 commit into from Mar 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 10 additions & 12 deletions main.go
Expand Up @@ -17,7 +17,7 @@ import (
_ "github.com/dfeyer/flow-debugproxy/dummypathmapper"
_ "github.com/dfeyer/flow-debugproxy/flowpathmapper"

"github.com/codegangsta/cli"
"github.com/urfave/cli"

"net"
"os"
Expand All @@ -28,51 +28,49 @@ func main() {
app := cli.NewApp()
app.Name = "flow-debugproxy"
app.Usage = "Flow Framework xDebug proxy"
app.Author = "Dominique Feyer"
app.Email = "dominique@neos.io"
app.Version = "1.0.1"

app.Flags = []cli.Flag{
cli.StringFlag{
&cli.StringFlag{
Name: "xdebug, l",
Value: "127.0.0.1:9000",
Usage: "Listen address IP and port number",
},
cli.StringFlag{
&cli.StringFlag{
Name: "ide, I",
Value: "127.0.0.1:9010",
Usage: "Bind address IP and port number",
},
cli.StringFlag{
&cli.StringFlag{
Name: "context, c",
Value: "Development",
Usage: "The context to run as",
},
cli.StringFlag{
&cli.StringFlag{
Name: "localroot, r",
Value: "",
Usage: "Local project root for remote debugging",
},
cli.StringFlag{
&cli.StringFlag{
Name: "framework",
Value: "flow",
Usage: "Framework support, currently on Flow framework (flow) or Dummy (dummy) is supported",
},
cli.BoolFlag{
&cli.BoolFlag{
Name: "verbose",
Usage: "Verbose",
},
cli.BoolFlag{
&cli.BoolFlag{
Name: "vv",
Usage: "Very verbose",
},
cli.BoolFlag{
&cli.BoolFlag{
Name: "debug",
Usage: "Show debug output",
},
}

app.Action = func(cli *cli.Context) {
app.Action = func(cli *cli.Context) error {
c := &config.Config{
Context: cli.String("context"),
Framework: cli.String("framework"),
Expand Down