-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from dcormier/dc/guid
Allow guid package to be used on non-Windows GOOS targets
- Loading branch information
Showing
3 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// +build !windows | ||
|
||
package guid | ||
|
||
// GUID represents a GUID/UUID. It has the same structure as | ||
// golang.org/x/sys/windows.GUID so that it can be used with functions expecting | ||
// that type. It is defined as its own type as that is only available to builds | ||
// targeted at `windows`. The representation matches that used by native Windows | ||
// code. | ||
type GUID struct { | ||
Data1 uint32 | ||
Data2 uint16 | ||
Data3 uint16 | ||
Data4 [8]byte | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package guid | ||
|
||
import "golang.org/x/sys/windows" | ||
|
||
// GUID represents a GUID/UUID. It has the same structure as | ||
// golang.org/x/sys/windows.GUID so that it can be used with functions expecting | ||
// that type. It is defined as its own type so that stringification and | ||
// marshaling can be supported. The representation matches that used by native | ||
// Windows code. | ||
type GUID windows.GUID |