Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanBaulch committed Sep 3, 2024
1 parent aebb08d commit 7713a96
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions exporters/prometheus/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ import (

func TestPrometheusExporter(t *testing.T) {
testCases := []struct {
name string
emptyResource bool
name string
emptyResource bool
customResourceAttrs []attribute.KeyValue
recordMetrics func(ctx context.Context, meter otelmetric.Meter)
options []Option
expectedFile string
recordMetrics func(ctx context.Context, meter otelmetric.Meter)
options []Option
expectedFile string
}{
{
name: "counter",
Expand Down Expand Up @@ -536,7 +536,7 @@ func TestDuplicateMetrics(t *testing.T) {
withTypeFoo := otelmetric.WithAttributeSet(typeFoo)
testCases := []struct {
name string
customResourceAttrs []attribute.KeyValue
customResourceAttrs []attribute.KeyValue
recordMetrics func(ctx context.Context, meterA, meterB otelmetric.Meter)
options []Option
possibleExpectedFiles []string
Expand Down
7 changes: 3 additions & 4 deletions sdk/resource/host_id_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@ import (
"golang.org/x/sys/windows/registry"
)

// implements hostIDReader
// implements hostIDReader.
type hostIDReaderWindows struct{}

// read reads MachineGuid from the windows registry key:
// SOFTWARE\Microsoft\Cryptography
// read reads MachineGuid from the Windows registry key:
// SOFTWARE\Microsoft\Cryptography.
func (*hostIDReaderWindows) read() (string, error) {
k, err := registry.OpenKey(
registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Cryptography`,
registry.QUERY_VALUE|registry.WOW64_64KEY,
)

if err != nil {
return "", err
}
Expand Down
1 change: 0 additions & 1 deletion sdk/resource/os_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
func platformOSDescription() (string, error) {
k, err := registry.OpenKey(
registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE)

if err != nil {
return "", err
}
Expand Down

0 comments on commit 7713a96

Please sign in to comment.