@@ -14,15 +14,15 @@ import (
1414func (auditor * AzureAuditor ) getSubscriptionList (ctx context.Context ) (list map [string ]* armsubscriptions.Subscription ) {
1515 list , err := auditor .azure .client .ListCachedSubscriptions (ctx )
1616 if err != nil {
17- auditor .Logger .Panic (err )
17+ auditor .Logger .Panic (err . Error () )
1818 }
1919 return list
2020}
2121
2222func (auditor * AzureAuditor ) getResourceGroupList (ctx context.Context , subscription * armsubscriptions.Subscription ) (list map [string ]* armresources.ResourceGroup ) {
2323 list , err := auditor .azure .client .ListResourceGroups (ctx , * subscription .SubscriptionID )
2424 if err != nil {
25- auditor .Logger .Panic (err )
25+ auditor .Logger .Panic (err . Error () )
2626 }
2727 return list
2828}
@@ -42,14 +42,14 @@ func (auditor *AzureAuditor) getResourceList(ctx context.Context, subscription *
4242
4343 client , err := armresources .NewClient (* subscription .SubscriptionID , auditor .azure .client .GetCred (), nil )
4444 if err != nil {
45- auditor .Logger .Panic (err )
45+ auditor .Logger .Panic (err . Error () )
4646 }
4747 pager := client .NewListPager (nil )
4848
4949 for pager .More () {
5050 result , err := pager .NextPage (ctx )
5151 if err != nil {
52- auditor .Logger .Panic (err )
52+ auditor .Logger .Panic (err . Error () )
5353 }
5454
5555 for _ , item := range result .Value {
@@ -81,14 +81,14 @@ func (auditor *AzureAuditor) getRoleDefinitionList(ctx context.Context, subscrip
8181
8282 client , err := armauthorization .NewRoleDefinitionsClient (auditor .azure .client .GetCred (), nil )
8383 if err != nil {
84- auditor .Logger .Panic (err )
84+ auditor .Logger .Panic (err . Error () )
8585 }
8686
8787 pager := client .NewListPager (* subscription .ID , nil )
8888 for pager .More () {
8989 result , err := pager .NextPage (ctx )
9090 if err != nil {
91- auditor .Logger .Panic (err )
91+ auditor .Logger .Panic (err . Error () )
9292 }
9393
9494 for _ , item := range result .Value {
0 commit comments