Fix context variable name

This commit is contained in:
Ryan Cavicchioni 2021-03-30 13:33:36 -05:00
parent 53bc7fa320
commit de93716b20
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -68,7 +68,7 @@ func Main(args []string) (int, error) {
lifx.WithDebug(debugFlag),
)
Context := Context{
ctx := Context{
Client: c,
Config: *config,
Args: args[i:],
@ -83,11 +83,11 @@ func Main(args []string) (int, error) {
fs := cmd.Flags
if fs != nil {
fs.Parse(args[i:])
Context.Flags = Flags{FlagSet: fs}
ctx.Flags = Flags{FlagSet: fs}
}
Context.Name = command
ctx.Name = command
exitCode, err := cmd.Func(Context)
exitCode, err := cmd.Func(ctx)
if err != nil {
err = fmt.Errorf("fatal: %s", err)
}