Update hints for linting

- remove some hints that are no longer needed
- added a nolint: unparam for removeSingleSigner() (return bool is only used in tests)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-07-12 14:25:19 +02:00
parent f3811e865e
commit 9847e96765
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
3 changed files with 1 additions and 2 deletions

View File

@ -42,7 +42,6 @@ func TestValidateAttach(t *testing.T) {
} }
} }
// nolint: unparam
func parseRun(args []string) (*container.Config, *container.HostConfig, *networktypes.NetworkingConfig, error) { func parseRun(args []string) (*container.Config, *container.HostConfig, *networktypes.NetworkingConfig, error) {
flags, copts := setupRunFlags() flags, copts := setupRunFlags()
if err := flags.Parse(args); err != nil { if err := flags.Parse(args); err != nil {

View File

@ -28,7 +28,6 @@ type fakeClient struct {
client.Client client.Client
} }
// nolint: unparam
func (c fakeClient) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registrytypes.AuthenticateOKBody, error) { func (c fakeClient) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registrytypes.AuthenticateOKBody, error) {
if auth.Password == expiredPassword { if auth.Password == expiredPassword {
return registrytypes.AuthenticateOKBody{}, fmt.Errorf("Invalid Username or Password") return registrytypes.AuthenticateOKBody{}, fmt.Errorf("Invalid Username or Password")

View File

@ -78,6 +78,7 @@ func isLastSignerForReleases(roleWithSig data.Role, allRoles []client.RoleWithSi
// removeSingleSigner attempts to remove a single signer and returns whether signer removal happened. // removeSingleSigner attempts to remove a single signer and returns whether signer removal happened.
// The signer not being removed doesn't necessarily raise an error e.g. user choosing "No" when prompted for confirmation. // The signer not being removed doesn't necessarily raise an error e.g. user choosing "No" when prompted for confirmation.
// nolint: unparam
func removeSingleSigner(cli command.Cli, repoName, signerName string, forceYes bool) (bool, error) { func removeSingleSigner(cli command.Cli, repoName, signerName string, forceYes bool) (bool, error) {
ctx := context.Background() ctx := context.Background()
imgRefAndAuth, err := trust.GetImageReferencesAndAuth(ctx, nil, image.AuthResolver(cli), repoName) imgRefAndAuth, err := trust.GetImageReferencesAndAuth(ctx, nil, image.AuthResolver(cli), repoName)