From caea3ab6da06a8f0aa2d8ec279aae9f9d99d1e5b Mon Sep 17 00:00:00 2001 From: Keepers Date: Thu, 11 May 2023 14:38:33 -0600 Subject: [PATCH] make the linter happy (#3394) #### Type of change - [x] :broom: Tech Debt/Cleanup --- .../pathtransformer/restore_path_transformer.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/internal/operations/pathtransformer/restore_path_transformer.go b/src/internal/operations/pathtransformer/restore_path_transformer.go index db8b2befd..8993328f3 100644 --- a/src/internal/operations/pathtransformer/restore_path_transformer.go +++ b/src/internal/operations/pathtransformer/restore_path_transformer.go @@ -128,15 +128,16 @@ func makeRestorePathsForEntry( // * Exchange Calendars (different folder handling) // * Exchange Email/Contacts // * OneDrive/SharePoint (needs drive information) - if ent.Exchange != nil { + switch true { + case ent.Exchange != nil: // TODO(ashmrtn): Eventually make Events have it's own function to handle // setting the restore destination properly. res.RestorePath, err = basicLocationPath(repoRef, locRef) - } else if ent.OneDrive != nil || + case ent.OneDrive != nil || (ent.SharePoint != nil && ent.SharePoint.ItemType == details.SharePointLibrary) || - (ent.SharePoint != nil && ent.SharePoint.ItemType == details.OneDriveItem) { + (ent.SharePoint != nil && ent.SharePoint.ItemType == details.OneDriveItem): res.RestorePath, err = drivePathMerge(ent, repoRef, locRef) - } else { + default: return res, clues.New("unknown entry type").WithClues(ctx) }