Fixed name bug

This commit is contained in:
rishabh-bector 2018-08-20 15:55:17 -05:00
parent a60514966a
commit 26c2b8f62e
2 changed files with 5 additions and 5 deletions

View File

@ -403,7 +403,7 @@ func main() {
ArgsUsage: " ", // can't be the empty string or we get the default output ArgsUsage: " ", // can't be the empty string or we get the default output
}, },
{ {
Name: "rapid", Name: "db",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
tags := make(map[string]string) tags := make(map[string]string)
tags["hostname"] = c.String("hostname") tags["hostname"] = c.String("hostname")
@ -436,11 +436,11 @@ func main() {
} }
return nil return nil
}, },
Usage: "Rapid is an SQL over HTTP reverse proxy", Usage: "SQL Gateway is an SQL over HTTP reverse proxy",
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.BoolFlag{ &cli.BoolFlag{
Name: "db", Name: "db",
Value: false, Value: true,
Usage: "Enable the SQL Gateway Proxy", Usage: "Enable the SQL Gateway Proxy",
}, },
&cli.StringFlag{ &cli.StringFlag{

View File

@ -49,9 +49,9 @@ type Proxy struct {
func StartProxy(c *cli.Context, logger *logrus.Logger) error { func StartProxy(c *cli.Context, logger *logrus.Logger) error {
proxy := NewProxy(c, logger) proxy := NewProxy(c, logger)
logger.Infof("Starting Rapid SQL Proxy on port %s", c.String("port")) logger.Infof("Starting Rapid SQL Proxy on port %s", strings.Split(c.String("url"), ":")[1])
err := http.ListenAndServe(":"+c.String("port"), proxy.Router) err := http.ListenAndServe(":"+strings.Split(c.String("url"), ":")[1], proxy.Router)
if err != nil { if err != nil {
return err return err
} }