Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Use conditional compilation for tests #895

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Use conditional compilation for tests #895

wants to merge 3 commits into from

Conversation

bege13mot
Copy link

@bege13mot bege13mot commented Oct 28, 2018

Signed-off-by: bege13mot <bege13mot@gmail.com>
@msftclas
Copy link

msftclas commented Oct 28, 2018

CLA assistant check
All CLA requirements met.

Signed-off-by: bege13mot <bege13mot@gmail.com>
@@ -0,0 +1,120 @@
package pack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a conditional build flag for windows, or is Go smart enough about the _windows filename that it implies the windows build tag? I recall reading about that somewhere...

Copy link
Author

@bege13mot bege13mot Nov 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bacongobbler,
As I can understand if we try to build it on a windows machine, there is no need to specify window build tag.

(example: source_windows_amd64.go) where GOOS and GOARCH represent any known operating system and architecture values respectively, then the file is considered to have an implicit build constraint requiring those terms (in addition to any explicit constraints in the file).

https://golang.org/pkg/go/build/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants