Skip to content

Commit

Permalink
chore: minor improvement for keyword search
Browse files Browse the repository at this point in the history
  • Loading branch information
go-to-k committed Oct 22, 2023
1 parent fd781d3 commit 6c656b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/action/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ func putToFunctionChannelByRegion(
return err
}

lowerKeyword := strings.ToLower(keyword)

for _, function := range functions {
for _, runtime := range targetRuntime {
select {
Expand All @@ -129,7 +131,6 @@ func putToFunctionChannelByRegion(
}
// for case-insensitive
lowerFunctionName := strings.ToLower(*function.FunctionName)
lowerKeyword := strings.ToLower(keyword)
if strings.Contains(lowerFunctionName, lowerKeyword) {
functionCh <- &types.LambdaFunctionData{
Runtime: runtime,
Expand Down

0 comments on commit 6c656b7

Please sign in to comment.