diff --git a/controller/nucleus/errors/errors.go b/controller/nucleus/errors/errors.go index fd14673392c07b9f3e04d8e387d7e77c5ffd9077..eac05eb448f53a654dd3acede79c215a70b4932f 100644 --- a/controller/nucleus/errors/errors.go +++ b/controller/nucleus/errors/errors.go @@ -182,12 +182,12 @@ func (e ErrCouldNotUpdate) Error() string { // ErrCouldNotFind implements the Error interface and is called if a // stored item can not be found. type ErrCouldNotFind struct { - ID interface{} - Name interface{} + ID any + Name string } func (e ErrCouldNotFind) Error() string { - return fmt.Sprintf("ID: %v or Name: %vnot found", e.ID, e.Name) + return fmt.Sprintf("ID: %v or Name: %v not found", e.ID, e.Name) } // ErrCouldNotCreate implements the Error interface and is called if a diff --git a/controller/rbac/roleFileSystemStore.go b/controller/rbac/roleFileSystemStore.go index c2bc4c71f58b0fee8af06a1893a1d2867df86830..3c4fd0c26026b49c9078b4034e738a0fe9056b53 100644 --- a/controller/rbac/roleFileSystemStore.go +++ b/controller/rbac/roleFileSystemStore.go @@ -105,7 +105,7 @@ func (s *FileSystemRoleStore) Delete(RoleToDelete rbac.Role) error { } } - return &errors.ErrCouldNotFind{ID: RoleToDelete.ID, Name: RoleToDelete.Name()} + return &errors.ErrCouldNotFind{ID: RoleToDelete.ID(), Name: RoleToDelete.Name()} } //Get takes a Roles ID and return the Role if found diff --git a/controller/rbac/userFileSystemStore.go b/controller/rbac/userFileSystemStore.go index b477a177feb70c27312ac67797ded0860d46e896..f0547a6b2a1ec0768da7927b1248102834ca96ee 100644 --- a/controller/rbac/userFileSystemStore.go +++ b/controller/rbac/userFileSystemStore.go @@ -105,7 +105,7 @@ func (s *FileSystemUserStore) Delete(userToDelete rbac.User) error { } } - return &errors.ErrCouldNotFind{ID: userToDelete.ID, Name: userToDelete.Name()} + return &errors.ErrCouldNotFind{ID: userToDelete.ID(), Name: userToDelete.Name()} } //Get takes a Users ID and return the User if found