mirror of https://github.com/docker/cli.git
Merge pull request #807 from thaJeztah/golint-fixes
golint: remove redundant ifs
This commit is contained in:
commit
1694921047
|
@ -243,8 +243,5 @@ func addStagedSigner(notaryRepo client.Repository, newSigner data.RoleName, sign
|
||||||
if err := notaryRepo.AddDelegationRoleAndKeys(trust.ReleasesRole, signerKeys); err != nil {
|
if err := notaryRepo.AddDelegationRoleAndKeys(trust.ReleasesRole, signerKeys); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := notaryRepo.AddDelegationPaths(trust.ReleasesRole, []string{""}); err != nil {
|
return notaryRepo.AddDelegationPaths(trust.ReleasesRole, []string{""})
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,8 +131,5 @@ func removeSingleSigner(cli command.Cli, repoName, signerName string, forceYes b
|
||||||
if err = notaryRepo.RemoveDelegationRole(signerDelegation); err != nil {
|
if err = notaryRepo.RemoveDelegationRole(signerDelegation); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err = notaryRepo.Publish(); err != nil {
|
return notaryRepo.Publish()
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,12 +249,7 @@ func isSupported(cmd *cobra.Command, details versionDetails) error {
|
||||||
if err := areSubcommandsSupported(cmd, details); err != nil {
|
if err := areSubcommandsSupported(cmd, details); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
return areFlagsSupported(cmd, details)
|
||||||
if err := areFlagsSupported(cmd, details); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func areFlagsSupported(cmd *cobra.Command, details versionDetails) error {
|
func areFlagsSupported(cmd *cobra.Command, details versionDetails) error {
|
||||||
|
|
|
@ -79,10 +79,7 @@ func GenYamlTreeCustom(cmd *cobra.Command, dir string, filePrepender func(string
|
||||||
if _, err := io.WriteString(f, filePrepender(filename)); err != nil {
|
if _, err := io.WriteString(f, filePrepender(filename)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := GenYamlCustom(cmd, f); err != nil {
|
return GenYamlCustom(cmd, f)
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GenYamlCustom creates custom yaml output
|
// GenYamlCustom creates custom yaml output
|
||||||
|
|
Loading…
Reference in New Issue