()
| 48 | ) |
| 49 | |
| 50 | func main() { |
| 51 | app := cli.NewApp() |
| 52 | app.Name = "redis proxy" |
| 53 | app.Description = "IceFireDB proxy, easier to use IceFireDB, support resp protocol." |
| 54 | app.Flags = []cli.Flag{ |
| 55 | cli.StringFlag{ |
| 56 | Name: "config,c", |
| 57 | Usage: "config file", |
| 58 | Required: false, |
| 59 | Value: "config/config.yaml", |
| 60 | }, |
| 61 | } |
| 62 | showBanner() |
| 63 | app.Before = initConfig |
| 64 | app.Action = start |
| 65 | err := app.Run(os.Args) |
| 66 | if err != nil { |
| 67 | logrus.Errorf("failed to run application: %v", err) |
| 68 | os.Exit(1) |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | func start(c *cli.Context) error { |
| 73 | ctx, cancel := context.WithCancel(context.Background()) |
nothing calls this directly
no test coverage detected