Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed Aug 16, 2020
1 parent be98c6b commit 8a8209d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion collector_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"github.com/Azure/azure-sdk-for-go/profiles/latest/resources/mgmt/subscriptions"
"time"
log "github.com/sirupsen/logrus"
"time"
)

type CollectorBase struct {
Expand Down
12 changes: 6 additions & 6 deletions config/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ type (

// azure
Azure struct {
Environment *string `long:"azure.environment" env:"AZURE_ENVIRONMENT" description:"Azure environment name" default:"AZUREPUBLICCLOUD"`
Subscription []string `long:"azure.subscription" env:"AZURE_SUBSCRIPTION_ID" env-delim:" " description:"Azure subscription ID"`
Location []string `long:"azure.location" env:"AZURE_LOCATION" env-delim:" " description:"Azure locations" default:"westeurope" default:"northeurope"`
ResourceGroup string `long:"azure.resourcegroup" env:"AZURE_RESOURCEGROUP" description:"Azure ResourceGroup"`
ResourceTags []string `long:"azure.resource-tag" env:"AZURE_RESOURCE_TAG" env-delim:" " description:"Azure Resource tags" default:"owner"`
Environment *string `long:"azure.environment" env:"AZURE_ENVIRONMENT" description:"Azure environment name" default:"AZUREPUBLICCLOUD"`
Subscription []string `long:"azure.subscription" env:"AZURE_SUBSCRIPTION_ID" env-delim:" " description:"Azure subscription ID"`
Location []string `long:"azure.location" env:"AZURE_LOCATION" env-delim:" " description:"Azure locations" default:"westeurope" default:"northeurope"`
ResourceGroup string `long:"azure.resourcegroup" env:"AZURE_RESOURCEGROUP" description:"Azure ResourceGroup"`
ResourceTags []string `long:"azure.resource-tag" env:"AZURE_RESOURCE_TAG" env-delim:" " description:"Azure Resource tags" default:"owner"`
}

// scrape times
Scrape struct {
Time time.Duration `long:"scrape.time" env:"SCRAPE_TIME" description:"Default scrape time (time.duration)" default:"5m"`
Time time.Duration `long:"scrape.time" env:"SCRAPE_TIME" description:"Default scrape time (time.duration)" default:"5m"`
}

// general options
Expand Down
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/Azure/go-autorest/autorest/azure/auth"
"github.com/jessevdk/go-flags"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/webdevops/azure-keyvault-exporter/config"
log "github.com/sirupsen/logrus"
"github.com/webdevops/azure-keyvault-exporter/config"
"net/http"
"os"
"path"
Expand All @@ -30,15 +30,16 @@ var (
AzureAuthorizer autorest.Authorizer
AzureSubscriptions []subscriptions.Subscription

azureKeyvaultTag AzureTagFilter
azureEnvironment azure.Environment
azureKeyvaultTag AzureTagFilter
azureEnvironment azure.Environment

collectorGeneralList map[string]*CollectorGeneral

// Git version information
gitCommit = "<unknown>"
gitTag = "<unknown>"
)

func main() {
initArgparser()

Expand Down
3 changes: 1 addition & 2 deletions metrics_keyvault.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/Azure/go-autorest/autorest/azure/auth"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
prometheusCommon "github.com/webdevops/go-prometheus-common"
"sync"
"time"
prometheusCommon "github.com/webdevops/go-prometheus-common"
)

type MetricsCollectorKeyvault struct {
Expand Down Expand Up @@ -353,7 +353,6 @@ func (m *MetricsCollectorKeyvault) collectKeyvault(ctx context.Context, logger *
}, 1)
}


for secretsResult.NotDone() {
item := secretsResult.Value()

Expand Down

0 comments on commit 8a8209d

Please sign in to comment.