From f90b1ad079281e375a137d196311e1dd349b2fd4 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Thu, 31 Mar 2022 19:17:11 -0700 Subject: [PATCH] universe: go: do not hardcode default platform Signed-off-by: Andrea Luzzardi --- pkg/universe.dagger.io/go/build.cue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/universe.dagger.io/go/build.cue b/pkg/universe.dagger.io/go/build.cue index eb0a080e..5e64b171 100644 --- a/pkg/universe.dagger.io/go/build.cue +++ b/pkg/universe.dagger.io/go/build.cue @@ -13,10 +13,10 @@ import ( package: *"." | string // Target architecture - arch: *"amd64" | string + arch?: string // Target OS - os: *"linux" | string + os?: string // Build tags to use for building tags: *"" | string @@ -30,8 +30,12 @@ import ( "source": source "env": { env - GOOS: os - GOARCH: arch + if os != _|_ { + GOOS: os + } + if arch != _|_ { + GOARCH: arch + } } command: { args: [package]