Skip to content

Commit

Permalink
go-cloud-debug-agent: restrict building to Linux
Browse files Browse the repository at this point in the history
This binary uses the golang.org/x/debug package, which cannot build
except under Linux. Non-Linux users get an error when they go install
or go test from the repo root.

Adding a build constraint to the main binary file fixes the problem.

Also, add an import identifier for a package with a different import
path, so goimports doesn't mistakenly delete the import.

Change-Id: If2659af1f98b0255a2c8e60fb64a6e191f9cc48e
Reviewed-on: https://code-review.googlesource.com/8576
Reviewed-by: John Dethridge <[email protected]>
  • Loading branch information
jba authored and John Dethridge committed Oct 20, 2016
1 parent d2c474b commit 50a7624
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/go-cloud-debug-agent/debuglet.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build linux

package main

import (
Expand All @@ -26,7 +28,7 @@ import (
"time"

"cloud.google.com/go/cmd/go-cloud-debug-agent/internal/breakpoints"
"cloud.google.com/go/cmd/go-cloud-debug-agent/internal/controller"
debuglet "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/controller"
"cloud.google.com/go/cmd/go-cloud-debug-agent/internal/valuecollector"
"cloud.google.com/go/compute/metadata"
"golang.org/x/debug"
Expand Down

0 comments on commit 50a7624

Please sign in to comment.