Skip to content

Commit

Permalink
Linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pyohannes committed May 29, 2024
1 parent 0fabd24 commit abe8d39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions detectors/azure/vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import (
)

const (
defaultAzureVmMetadataEndpoint = "http://169.254.169.254/metadata/instance/compute?api-version=2021-12-13&format=json"
defaultAzureVMMetadataEndpoint = "http://169.254.169.254/metadata/instance/compute?api-version=2021-12-13&format=json"
)

type config struct {
endpoint string
}

func newConfig(options ...Option) config {
c := config{defaultAzureVmMetadataEndpoint}
c := config{defaultAzureVMMetadataEndpoint}
for _, option := range options {
c = option.apply(c)
}
Expand Down
3 changes: 2 additions & 1 deletion detectors/azure/vm/vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@ func TestDetect(t *testing.T) {
fmt.Fprintf(w, tCase.input.jsonMetadata)
}
}))
defer svr.Close()

detector := New(WithEndpoint(svr.URL))

azureResource, err := detector.Detect(context.Background())

svr.Close()

assert.Equal(t, err != nil, tCase.expected.err)
assert.Equal(t, tCase.expected.resource, azureResource)
}
Expand Down

0 comments on commit abe8d39

Please sign in to comment.