Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build guards for all Windows imports #191

Merged
merged 5 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backup_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package winio

import (
Expand Down
2 changes: 2 additions & 0 deletions backuptar/tar_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package backuptar

import (
Expand Down
2 changes: 2 additions & 0 deletions ea_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package winio

import (
Expand Down
2 changes: 2 additions & 0 deletions hvsock.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package winio

import (
Expand Down
2 changes: 2 additions & 0 deletions pipe_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package winio

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/etw/eventdata.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package etw

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/etw/eventopt.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package etw

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/etw/fieldopt.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package etw

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/etw/newprovider.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// +build windows
// +build amd64 arm64 386

package etw
Expand Down
1 change: 1 addition & 0 deletions pkg/etw/newprovider_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// +build windows
// +build arm

package etw
Expand Down
2 changes: 2 additions & 0 deletions pkg/etw/provider.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package etw

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/etw/provider_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package etw

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/etw/providerglobal.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package etw

import (
Expand Down
5 changes: 5 additions & 0 deletions pkg/etw/sample/noop.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// +build !windows

package main

func main() {}
uhthomas marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions pkg/etw/sample/sample.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

// Shows a sample usage of the ETW logging package.
package main

Expand Down
1 change: 1 addition & 0 deletions pkg/etw/wrapper_32.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// +build windows
// +build 386 arm

package etw
Expand Down
1 change: 1 addition & 0 deletions pkg/etw/wrapper_64.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// +build windows
// +build amd64 arm64

package etw
Expand Down
2 changes: 2 additions & 0 deletions pkg/etwlogrus/hook.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package etwlogrus

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/etwlogrus/hook_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package etwlogrus

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/guid/guid.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

// Package guid provides a GUID type. The backing structure for a GUID is
// identical to that used by the golang.org/x/sys/windows GUID type.
// There are two main binary encodings used for a GUID, the big-endian encoding,
Expand Down
2 changes: 2 additions & 0 deletions pkg/guid/guid_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package guid

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/process/process.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package process

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/process/syscall.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package process

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/security/grantvmgroupaccess.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package security

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/security/grantvmgroupaccess_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//+build windows

package security

import (
Expand Down
2 changes: 2 additions & 0 deletions privileges_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package winio

import "testing"
Expand Down
2 changes: 2 additions & 0 deletions sd_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package winio

import "testing"
Expand Down
2 changes: 2 additions & 0 deletions tools/etw-provider-gen/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package main

import (
Expand Down
5 changes: 5 additions & 0 deletions tools/etw-provider-gen/noop.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// +build !windows

package main

func main() {}
2 changes: 2 additions & 0 deletions vhd/zvhd.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT

package vhd
Expand Down
2 changes: 2 additions & 0 deletions wim/decompress.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package wim

import (
Expand Down
5 changes: 5 additions & 0 deletions wim/validate/noop.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// +build !windows

package main

func main() {}
2 changes: 2 additions & 0 deletions wim/validate/validate.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions wim/wim.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build windows

// Package wim implements a WIM file parser.
//
// WIM files are used to distribute Windows file system and container images.
Expand Down