client: remove redundant pluginPermissionDenied
It was only used in a single location, and only a "convenience" type, not used to detect a specific error. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c3f0cd7457
commit
7f0cf432e9
2 changed files with 1 additions and 9 deletions
|
@ -58,14 +58,6 @@ func (e objectNotFoundError) Error() string {
|
|||
return fmt.Sprintf("Error: No such %s: %s", e.object, e.id)
|
||||
}
|
||||
|
||||
type pluginPermissionDenied struct {
|
||||
name string
|
||||
}
|
||||
|
||||
func (e pluginPermissionDenied) Error() string {
|
||||
return "Permission denied while installing plugin " + e.name
|
||||
}
|
||||
|
||||
// NewVersionError returns an error if the APIVersion required
|
||||
// if less than the current supported version
|
||||
func (cli *Client) NewVersionError(APIrequired, feature string) error {
|
||||
|
|
|
@ -107,7 +107,7 @@ func (cli *Client) checkPluginPermissions(ctx context.Context, query url.Values,
|
|||
return nil, err
|
||||
}
|
||||
if !accept {
|
||||
return nil, pluginPermissionDenied{options.RemoteRef}
|
||||
return nil, errors.Errorf("permission denied while installing plugin %s", options.RemoteRef)
|
||||
}
|
||||
}
|
||||
return privileges, nil
|
||||
|
|
Loading…
Add table
Reference in a new issue