From: Jason A. Donenfeld Date: Thu, 7 Feb 2019 01:56:31 +0000 (+0100) Subject: setupapi: Do not export the toGo/toWindows functions X-Git-Tag: 0.0.20190409~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=223685875faa568d97ff1d5324fe994d24f618e7;p=thirdparty%2Fwireguard-go.git setupapi: Do not export the toGo/toWindows functions --- diff --git a/setupapi/setupapi_windows_test.go b/setupapi/setupapi_windows_test.go index 2325164..e6b00c9 100644 --- a/setupapi/setupapi_windows_test.go +++ b/setupapi/setupapi_windows_test.go @@ -169,7 +169,7 @@ func TestDevInfo_BuildDriverInfoList(t *testing.T) { 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") } diff --git a/setupapi/types_windows.go b/setupapi/types_windows.go index 1fb9a8f..7d16d43 100644 --- a/setupapi/types_windows.go +++ b/setupapi/types_windows.go @@ -326,7 +326,7 @@ type SP_DRVINFO_DATA struct { DriverVersion uint64 } -func (data *SP_DRVINFO_DATA) ToGo() *DrvInfoData { +func (data *SP_DRVINFO_DATA) toGo() *DrvInfoData { return &DrvInfoData{ DriverType: data.DriverType, Description: windows.UTF16ToString(data.Description[:]), @@ -373,7 +373,7 @@ type DrvInfoData struct { 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{ DriverType: DriverInfoData.DriverType, DriverDate: DriverInfoData.DriverDate,