Skip to content

Commit

Permalink
not export custom types
Browse files Browse the repository at this point in the history
  • Loading branch information
司芳源 committed Jun 22, 2018
1 parent 98cd971 commit 1b641b2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions disk/disk_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ type Win32_PerfFormattedData struct {
AvgDisksecPerRead uint64
AvgDisksecPerWrite uint64
}
type Win32_DiskDrive struct {
DeviceID string
FirmwareRevision string
InterfaceType string
SerialNumber string
type win32_DiskDrive struct {
DeviceID string
SerialNumber string
}
type Win32_DiskPartition struct {
type win32_DiskPartition struct {
DeviceID string
}

Expand Down Expand Up @@ -187,8 +185,8 @@ func GetDiskSerialNumber(name string) string {
}

func GetDiskSerialNumberWithContext(ctx context.Context, name string) string {
var diskPart []Win32_DiskPartition
var diskDrive []Win32_DiskDrive
var diskPart []win32_DiskPartition
var diskDrive []win32_DiskDrive
err := common.WMIQueryWithContext(ctx, "Associators of {Win32_LogicalDisk.DeviceID='"+name+"'} where AssocClass=Win32_LogicalDiskToPartition", &diskPart)
if err != nil || len(diskPart) <= 0 {
return ""
Expand Down

0 comments on commit 1b641b2

Please sign in to comment.