diff --git a/exporters/prometheus/exporter_test.go b/exporters/prometheus/exporter_test.go index 10be0094d51f..38e4d1d990db 100644 --- a/exporters/prometheus/exporter_test.go +++ b/exporters/prometheus/exporter_test.go @@ -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", @@ -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 diff --git a/sdk/resource/host_id_windows.go b/sdk/resource/host_id_windows.go index 71386e2da4c7..3677c83d7da3 100644 --- a/sdk/resource/host_id_windows.go +++ b/sdk/resource/host_id_windows.go @@ -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 } diff --git a/sdk/resource/os_windows.go b/sdk/resource/os_windows.go index 5e3d199d7856..a6a5a53c0ea7 100644 --- a/sdk/resource/os_windows.go +++ b/sdk/resource/os_windows.go @@ -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 }