Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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