1
0
mirror of https://git.zx2c4.com/wireguard-go synced 2024-11-15 01:05:15 +01:00

setupapi: Do not export the toGo/toWindows functions

This commit is contained in:
Jason A. Donenfeld 2019-02-07 02:56:31 +01:00
parent 652158ec3c
commit 223685875f
2 changed files with 3 additions and 3 deletions

View File

@ -169,7 +169,7 @@ func TestDevInfo_BuildDriverInfoList(t *testing.T) {
continue continue
} }
if driverData2, err2 := driverData.ToGo().ToWindows(); err2 != nil || *driverData2 != *driverData { if driverData2, err2 := driverData.toGo().toWindows(); err2 != nil || *driverData2 != *driverData {
t.Error("Error converting between SP_DRVINFO_DATA and DrvInfoData") t.Error("Error converting between SP_DRVINFO_DATA and DrvInfoData")
} }

View File

@ -326,7 +326,7 @@ type SP_DRVINFO_DATA struct {
DriverVersion uint64 DriverVersion uint64
} }
func (data *SP_DRVINFO_DATA) ToGo() *DrvInfoData { func (data *SP_DRVINFO_DATA) toGo() *DrvInfoData {
return &DrvInfoData{ return &DrvInfoData{
DriverType: data.DriverType, DriverType: data.DriverType,
Description: windows.UTF16ToString(data.Description[:]), Description: windows.UTF16ToString(data.Description[:]),
@ -373,7 +373,7 @@ type DrvInfoData struct {
DriverVersion uint64 DriverVersion uint64
} }
func (DriverInfoData *DrvInfoData) ToWindows() (data *SP_DRVINFO_DATA, err error) { func (DriverInfoData *DrvInfoData) toWindows() (data *SP_DRVINFO_DATA, err error) {
data = &SP_DRVINFO_DATA{ data = &SP_DRVINFO_DATA{
DriverType: DriverInfoData.DriverType, DriverType: DriverInfoData.DriverType,
DriverDate: DriverInfoData.DriverDate, DriverDate: DriverInfoData.DriverDate,