From 9bfa3f580f39ea12269b9c3eb45c2f100b7a90fa Mon Sep 17 00:00:00 2001 From: Erik Hollensbe Date: Sun, 22 Jan 2017 21:47:33 -0800 Subject: [PATCH] Build only on windows. Signed-off-by: Erik Hollensbe --- activatelayer.go | 2 ++ baselayer.go | 2 ++ callback.go | 2 ++ cgo.go | 2 ++ container.go | 2 ++ createlayer.go | 2 ++ createsandboxlayer.go | 2 ++ deactivatelayer.go | 2 ++ destroylayer.go | 2 ++ errors.go | 2 ++ expandsandboxsize.go | 2 ++ exportlayer.go | 2 ++ getlayermountpath.go | 2 ++ getsharedbaseimages.go | 2 ++ guid.go | 2 ++ hcsshim.go | 2 ++ hnsfuncs.go | 2 ++ importlayer.go | 2 ++ interface.go | 2 ++ layerexists.go | 2 ++ layerutils.go | 2 ++ legacy.go | 2 ++ mksyscall_windows.go | 3 +++ nametoguid.go | 2 ++ preparelayer.go | 2 ++ process.go | 2 ++ processimage.go | 2 ++ unpreparelayer.go | 2 ++ utils.go | 2 ++ version.go | 2 ++ waithelper.go | 2 ++ zhcsshim.go | 1 + 32 files changed, 64 insertions(+) diff --git a/activatelayer.go b/activatelayer.go index efc4d8029c..4468300296 100644 --- a/activatelayer.go +++ b/activatelayer.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "github.com/Sirupsen/logrus" diff --git a/baselayer.go b/baselayer.go index 9babd4e18a..d93beb7af5 100644 --- a/baselayer.go +++ b/baselayer.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/callback.go b/callback.go index e8c2b00c8a..fe6ae1937c 100644 --- a/callback.go +++ b/callback.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/cgo.go b/cgo.go index 2003332330..9b192ff87e 100644 --- a/cgo.go +++ b/cgo.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "C" diff --git a/container.go b/container.go index ba3faeb206..0a95ccfd07 100644 --- a/container.go +++ b/container.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/createlayer.go b/createlayer.go index 9ecffb1cb0..bf44f978c0 100644 --- a/createlayer.go +++ b/createlayer.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "github.com/Sirupsen/logrus" diff --git a/createsandboxlayer.go b/createsandboxlayer.go index b69c3da368..2d8a3e1d81 100644 --- a/createsandboxlayer.go +++ b/createsandboxlayer.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "github.com/Sirupsen/logrus" diff --git a/deactivatelayer.go b/deactivatelayer.go index c02bcb3a0b..ac91861f45 100644 --- a/deactivatelayer.go +++ b/deactivatelayer.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "github.com/Sirupsen/logrus" diff --git a/destroylayer.go b/destroylayer.go index 91ed269eef..ef82d955d7 100644 --- a/destroylayer.go +++ b/destroylayer.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "github.com/Sirupsen/logrus" diff --git a/errors.go b/errors.go index 19bb97a05b..8799416252 100644 --- a/errors.go +++ b/errors.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/expandsandboxsize.go b/expandsandboxsize.go index e168921841..2b418b3620 100644 --- a/expandsandboxsize.go +++ b/expandsandboxsize.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "github.com/Sirupsen/logrus" diff --git a/exportlayer.go b/exportlayer.go index 903e08519d..a2a8a139cb 100644 --- a/exportlayer.go +++ b/exportlayer.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/getlayermountpath.go b/getlayermountpath.go index 41b5758926..be4cb3d2da 100644 --- a/getlayermountpath.go +++ b/getlayermountpath.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/getsharedbaseimages.go b/getsharedbaseimages.go index 01ab4da3dd..a0e6b9ac8f 100644 --- a/getsharedbaseimages.go +++ b/getsharedbaseimages.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "github.com/Sirupsen/logrus" diff --git a/guid.go b/guid.go index 620aba123c..e55e309a16 100644 --- a/guid.go +++ b/guid.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/hcsshim.go b/hcsshim.go index 3cb3a299ff..91675e7806 100644 --- a/hcsshim.go +++ b/hcsshim.go @@ -1,3 +1,5 @@ +// +build windows + // Shim for the Host Compute Service (HCS) to manage Windows Server // containers and Hyper-V containers. diff --git a/hnsfuncs.go b/hnsfuncs.go index e3d8c0b145..1f664b60fe 100644 --- a/hnsfuncs.go +++ b/hnsfuncs.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/importlayer.go b/importlayer.go index 5f826301e1..78c6111c9a 100644 --- a/importlayer.go +++ b/importlayer.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/interface.go b/interface.go index 794821899e..37fccd7606 100644 --- a/interface.go +++ b/interface.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/layerexists.go b/layerexists.go index 522d95cce4..de655025ac 100644 --- a/layerexists.go +++ b/layerexists.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "github.com/Sirupsen/logrus" diff --git a/layerutils.go b/layerutils.go index 47229d22e5..eb16772005 100644 --- a/layerutils.go +++ b/layerutils.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim // This file contains utility functions to support storage (graph) related diff --git a/legacy.go b/legacy.go index 11d90a7bdd..4c9a365f9d 100644 --- a/legacy.go +++ b/legacy.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/mksyscall_windows.go b/mksyscall_windows.go index 82393ca367..c254495529 100644 --- a/mksyscall_windows.go +++ b/mksyscall_windows.go @@ -1,3 +1,5 @@ +// +build windows + // Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -842,6 +844,7 @@ func main() { // TODO: use println instead to print in the following template const srcTemplate = ` +// +build windows {{define "main"}}// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT diff --git a/nametoguid.go b/nametoguid.go index 1a522f95e0..40ca3b7e49 100644 --- a/nametoguid.go +++ b/nametoguid.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "github.com/Sirupsen/logrus" diff --git a/preparelayer.go b/preparelayer.go index 2791683467..cf2af79264 100644 --- a/preparelayer.go +++ b/preparelayer.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/process.go b/process.go index af3fab3526..a558d9fd54 100644 --- a/process.go +++ b/process.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/processimage.go b/processimage.go index fadb1b92c5..9141a0049a 100644 --- a/processimage.go +++ b/processimage.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "os" diff --git a/unpreparelayer.go b/unpreparelayer.go index d0ead0bdda..2194e8bcbf 100644 --- a/unpreparelayer.go +++ b/unpreparelayer.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import "github.com/Sirupsen/logrus" diff --git a/utils.go b/utils.go index bd6e2d94ab..a0c9097c84 100644 --- a/utils.go +++ b/utils.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/version.go b/version.go index ae10c23d42..59d017b951 100644 --- a/version.go +++ b/version.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim // IsTP4 returns whether the currently running Windows build is at least TP4. diff --git a/waithelper.go b/waithelper.go index 89c94616ad..71e4e76646 100644 --- a/waithelper.go +++ b/waithelper.go @@ -1,3 +1,5 @@ +// +build windows + package hcsshim import ( diff --git a/zhcsshim.go b/zhcsshim.go index 5d1a851ae8..a27638911e 100644 --- a/zhcsshim.go +++ b/zhcsshim.go @@ -1,3 +1,4 @@ +// +build windows // MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT package hcsshim