cmd: don't alias context package, and use cliContext for cli.Context
Unfortunately, this is a rather large diff, but perhaps worth a one-time "rip off the bandaid" for v2. This patch removes the use of "gocontext" as alias for stdLib's "context", and uses "cliContext" for uses of cli.context. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -45,12 +45,12 @@ var defaultSpecCommand = &cli.Command{
|
||||
Usage: "Platform of the spec to print (Examples: 'linux/arm64', 'windows/amd64')",
|
||||
},
|
||||
},
|
||||
Action: func(context *cli.Context) error {
|
||||
ctx, cancel := commands.AppContext(context)
|
||||
Action: func(cliContext *cli.Context) error {
|
||||
ctx, cancel := commands.AppContext(cliContext)
|
||||
defer cancel()
|
||||
|
||||
platform := platforms.DefaultString()
|
||||
if plat := context.String("platform"); plat != "" {
|
||||
if plat := cliContext.String("platform"); plat != "" {
|
||||
platform = plat
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user