Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
linter, unit test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfkeepers committed Jan 25, 2024
1 parent 0a6355e commit 41dd358
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
20 changes: 10 additions & 10 deletions src/pkg/path/service_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ const (
)

var strToSvc = map[string]ServiceType{
ExchangeService.String(): ExchangeService,
ExchangeMetadataService.String(): ExchangeMetadataService,
OneDriveService.String(): OneDriveService,
OneDriveMetadataService.String(): OneDriveMetadataService,
SharePointService.String(): SharePointService,
SharePointMetadataService.String(): SharePointMetadataService,
GroupsService.String(): GroupsService,
GroupsMetadataService.String(): GroupsMetadataService,
TeamsChatsService.String(): TeamsChatsService,
TeamsChatsMetadataService.String(): TeamsChatsMetadataService,
strings.ToLower(ExchangeService.String()): ExchangeService,
strings.ToLower(ExchangeMetadataService.String()): ExchangeMetadataService,
strings.ToLower(OneDriveService.String()): OneDriveService,
strings.ToLower(OneDriveMetadataService.String()): OneDriveMetadataService,
strings.ToLower(SharePointService.String()): SharePointService,
strings.ToLower(SharePointMetadataService.String()): SharePointMetadataService,
strings.ToLower(GroupsService.String()): GroupsService,
strings.ToLower(GroupsMetadataService.String()): GroupsMetadataService,
strings.ToLower(TeamsChatsService.String()): TeamsChatsService,
strings.ToLower(TeamsChatsMetadataService.String()): TeamsChatsMetadataService,
}

func ToServiceType(service string) ServiceType {
Expand Down
13 changes: 7 additions & 6 deletions src/pkg/selectors/teamsChats.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (s *teamsChats) Chats(chats []string, opts ...option) []TeamsChatsScope {
}

// Retrieves all teamsChats data.
// Each user id generates three scopes, one for each data type: contact, event, and mail.
// Each user id generates a scope for each data type: chats (only one data type at this time).
// If any slice contains selectors.Any, that slice is reduced to [selectors.Any]
// If any slice contains selectors.None, that slice is reduced to [selectors.None]
// If any slice is empty, it defaults to [selectors.None]
Expand Down Expand Up @@ -361,7 +361,7 @@ func (ec teamsChatsCategory) pathValues(
itemCat = TeamsChatsChat

default:
return nil, clues.New("bad teamsChatCategory").With("category", ec)
return nil, clues.New("bad Chat Category").With("category", ec)
}

item := ent.ItemRef
Expand Down Expand Up @@ -449,10 +449,11 @@ func (s TeamsChatsScope) Get(cat teamsChatsCategory) []string {
return getCatValue(s, cat)
}

// sets a value by category to the scope. Only intended for internal use.
func (s TeamsChatsScope) set(cat teamsChatsCategory, v []string, opts ...option) TeamsChatsScope {
return set(s, cat, v, opts...)
}
// commenting out for now, but leaving in place; it's likely to return when we add filters
// // sets a value by category to the scope. Only intended for internal use.
// func (s TeamsChatsScope) set(cat teamsChatsCategory, v []string, opts ...option) TeamsChatsScope {
// return set(s, cat, v, opts...)
// }

// setDefaults ensures that contact folder, mail folder, and user category
// scopes all express `AnyTgt` for their child category types.
Expand Down

0 comments on commit 41dd358

Please sign in to comment.