From 7b9c9198d50e94f55db243e0e38f0ebd2705bf4e Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 24 May 2018 22:55:54 -0400 Subject: [PATCH] utils: make repo safe for "go build ./..." This directory contains two separate helper programs that can be run with "go run". It's not possible to cd into the directory and run "go build", because there are two different Go source files defining main.main. The canonical way to indicate this is to put a "// +build ignore" build tag at the top of such helper programs. Then they can still be run by go run decode_auth.go go run test_auth.go but will not be considered by "cd utils; go build" nor by commands like "go build ./..." or "go test ./..." in the root of the repo. --- utils/decode_auth.go | 2 ++ utils/test_auth.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/utils/decode_auth.go b/utils/decode_auth.go index 166b522..5fd8ba7 100644 --- a/utils/decode_auth.go +++ b/utils/decode_auth.go @@ -1,3 +1,5 @@ +// +build ignore + package main import ( diff --git a/utils/test_auth.go b/utils/test_auth.go index 057b0d7..ba0bdc6 100644 --- a/utils/test_auth.go +++ b/utils/test_auth.go @@ -1,3 +1,5 @@ +// +build ignore + package main import (