Skip to content

Commit

Permalink
recheck
Browse files Browse the repository at this point in the history
  • Loading branch information
antonh3 committed Nov 27, 2024
1 parent 0a2eb6f commit 7f03bd1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
22 changes: 14 additions & 8 deletions cmd/list-function-apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"fmt"
"os"
"os/signal"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -102,14 +103,19 @@ func listFunctionApps(ctx context.Context, client client.AzureClient, subscripti
ResourceGroupName: item.Ok.ResourceGroupName(),
TenantId: client.TenantInfo().TenantId,
}
if functionApp.Kind == "functionapp" {
log.V(2).Info("found function app", "functionApp", functionApp)
count++
if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{
Kind: enums.KindAZFunctionApp,
Data: functionApp,
}); !ok {
return
kinds := strings.Split(functionApp.Kind, ",")
for _, kind := range kinds {
kind = strings.TrimSpace(kind)
if strings.EqualFold(kind, "functionapp") {
log.V(2).Info("found function app", "functionApp", functionApp)
count++
if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{
Kind: enums.KindAZFunctionApp,
Data: functionApp,
}); !ok {
return
}
break
}
}
}
Expand Down
22 changes: 14 additions & 8 deletions cmd/list-web-apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"fmt"
"os"
"os/signal"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -107,14 +108,19 @@ func listWebApps(ctx context.Context, client client.AzureClient, subscriptions <
ResourceGroupName: item.Ok.ResourceGroupName(),
TenantId: client.TenantInfo().TenantId,
}
if webApp.Kind == "app" {
log.V(2).Info("found web app", "webApp", webApp)
count++
if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{
Kind: enums.KindAZWebApp,
Data: webApp,
}); !ok {
return
kinds := strings.Split(webApp.Kind, ",")
for _, kind := range kinds {
kind = strings.TrimSpace(kind)
if strings.EqualFold(kind, "app") {
log.V(2).Info("found web app", "webApp", webApp)
count++
if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{
Kind: enums.KindAZWebApp,
Data: webApp,
}); !ok {
return
}
break
}
}
}
Expand Down

0 comments on commit 7f03bd1

Please sign in to comment.