Skip to content

Commit

Permalink
fix golangcilint false positive
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
  • Loading branch information
mblaschke committed Oct 23, 2023
1 parent 5d44b32 commit e0da459
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metrics/servicediscovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ func (sd *AzureServiceDiscovery) publishTargetList(targetList []MetricProbeTarge
}

func (sd *AzureServiceDiscovery) fetchResourceList(subscriptionId, filter string) (resourceList []AzureResource, err error) {
// nolint:gosec
cacheKey := fmt.Sprintf(
"%x",
string(sha1.New().Sum([]byte(fmt.Sprintf("%v:%v", subscriptionId, filter)))),
) // #nosec G401
)

// try to fetch info from cache
if cachedResourceList, ok := sd.fetchFromCache(cacheKey); !ok {
Expand Down

0 comments on commit e0da459

Please sign in to comment.