golint: remove redundant ifs

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-01-13 13:16:34 +01:00
parent b7b3e9a261
commit d845b4d36a
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
4 changed files with 4 additions and 18 deletions

View File

@ -243,8 +243,5 @@ func addStagedSigner(notaryRepo client.Repository, newSigner data.RoleName, sign
if err := notaryRepo.AddDelegationRoleAndKeys(trust.ReleasesRole, signerKeys); err != nil {
return err
}
if err := notaryRepo.AddDelegationPaths(trust.ReleasesRole, []string{""}); err != nil {
return err
}
return nil
return notaryRepo.AddDelegationPaths(trust.ReleasesRole, []string{""})
}

View File

@ -131,8 +131,5 @@ func removeSingleSigner(cli command.Cli, repoName, signerName string, forceYes b
if err = notaryRepo.RemoveDelegationRole(signerDelegation); err != nil {
return err
}
if err = notaryRepo.Publish(); err != nil {
return err
}
return nil
return notaryRepo.Publish()
}

View File

@ -249,12 +249,7 @@ func isSupported(cmd *cobra.Command, details versionDetails) error {
if err := areSubcommandsSupported(cmd, details); err != nil {
return err
}
if err := areFlagsSupported(cmd, details); err != nil {
return err
}
return nil
return areFlagsSupported(cmd, details)
}
func areFlagsSupported(cmd *cobra.Command, details versionDetails) error {

View File

@ -79,10 +79,7 @@ func GenYamlTreeCustom(cmd *cobra.Command, dir string, filePrepender func(string
if _, err := io.WriteString(f, filePrepender(filename)); err != nil {
return err
}
if err := GenYamlCustom(cmd, f); err != nil {
return err
}
return nil
return GenYamlCustom(cmd, f)
}
// GenYamlCustom creates custom yaml output