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

pkg/cli fails standard golint check #107

Open
gdearment opened this issue Jun 18, 2018 · 1 comment
Open

pkg/cli fails standard golint check #107

gdearment opened this issue Jun 18, 2018 · 1 comment

Comments

@gdearment
Copy link
Contributor

Implementing a cli.App.ContextConfig function causes the implementing package to fail standard golint checks:

func initContext(_ cli.Context, ctx context.Context) context.Context {
...
}

fails with:

[golint]        main.go:41:1: context.Context should be the first parameter of a function
@nmiyake
Copy link
Contributor

nmiyake commented Jun 18, 2018

This is unfortunate, but fixing it would require a breaking change and would also be inconsistent with the rest of the cli functions, where the cli.Context is always the first argument.

We could do a major version bump that fixes this one function, but not sure that it's worth doing so given that we generally recommend folks to use the Cobra CLI going forward and the golint checks can be disabled/ignored using configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants