aboutsummaryrefslogtreecommitdiff
path: root/go/private/rules/binary.bzl
diff options
context:
space:
mode:
authorXiaoyi <ashi009@users.noreply.github.com>2018-01-10 23:23:35 +0800
committerJay Conrod <jayconrod@gmail.com>2018-01-10 07:23:35 -0800
commit8c17538177325f2d2d7aace59200cac453fd46aa (patch)
tree445f7b18277a28df4bc3b95c02d31c1ac591740a /go/private/rules/binary.bzl
parentec06a697acee088146fe9a45e6ebe1a3a022efa0 (diff)
downloadbazelbuild-rules_go-8c17538177325f2d2d7aace59200cac453fd46aa.tar.gz
Run buildifier against bazel files. (#1164)
The command I ran: ```shell $ find . \( -name '*.bzl' -or -name '*.BUILD*' -or -name 'WORKSPACE' \) -exec buildifier {} + ``` additional changes and fixes * implementation function should be on top in rule definitions * no newline between definitions and doc strings * Skylib is vendored. No modification allowed. * Keep entries in SDK_REPOSITORIES lined up
Diffstat (limited to 'go/private/rules/binary.bzl')
-rw-r--r--go/private/rules/binary.bzl78
1 files changed, 62 insertions, 16 deletions
diff --git a/go/private/rules/binary.bzl b/go/private/rules/binary.bzl
index 53776d73..6790880a 100644
--- a/go/private/rules/binary.bzl
+++ b/go/private/rules/binary.bzl
@@ -12,22 +12,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-load("@io_bazel_rules_go//go/private:context.bzl",
+load(
+ "@io_bazel_rules_go//go/private:context.bzl",
"go_context",
)
-load("@io_bazel_rules_go//go/private:common.bzl",
+load(
+ "@io_bazel_rules_go//go/private:common.bzl",
"go_filetype",
)
-load("@io_bazel_rules_go//go/private:rules/prefix.bzl",
+load(
+ "@io_bazel_rules_go//go/private:rules/prefix.bzl",
"go_prefix_default",
)
-load("@io_bazel_rules_go//go/private:rules/aspect.bzl",
+load(
+ "@io_bazel_rules_go//go/private:rules/aspect.bzl",
"go_archive_aspect",
)
-load("@io_bazel_rules_go//go/private:providers.bzl",
+load(
+ "@io_bazel_rules_go//go/private:providers.bzl",
"GoLibrary",
)
-load("@io_bazel_rules_go//go/platform:list.bzl",
+load(
+ "@io_bazel_rules_go//go/platform:list.bzl",
"GOOS",
"GOARCH",
)
@@ -69,19 +75,59 @@ go_binary = rule(
cfg = "data",
),
"srcs": attr.label_list(allow_files = go_filetype),
- "deps": attr.label_list(providers = [GoLibrary], aspects = [go_archive_aspect]),
- "embed": attr.label_list(providers = [GoLibrary], aspects = [go_archive_aspect]),
- "pure": attr.string(values=["on", "off", "auto"], default="auto"),
- "static": attr.string(values=["on", "off", "auto"], default="auto"),
- "race": attr.string(values=["on", "off", "auto"], default="auto"),
- "msan": attr.string(values=["on", "off", "auto"], default="auto"),
- "goos": attr.string(values=GOOS.keys() + ["auto"], default="auto"),
- "goarch": attr.string(values=GOARCH.keys() + ["auto"], default="auto"),
+ "deps": attr.label_list(
+ providers = [GoLibrary],
+ aspects = [go_archive_aspect],
+ ),
+ "embed": attr.label_list(
+ providers = [GoLibrary],
+ aspects = [go_archive_aspect],
+ ),
+ "pure": attr.string(
+ values = [
+ "on",
+ "off",
+ "auto",
+ ],
+ default = "auto",
+ ),
+ "static": attr.string(
+ values = [
+ "on",
+ "off",
+ "auto",
+ ],
+ default = "auto",
+ ),
+ "race": attr.string(
+ values = [
+ "on",
+ "off",
+ "auto",
+ ],
+ default = "auto",
+ ),
+ "msan": attr.string(
+ values = [
+ "on",
+ "off",
+ "auto",
+ ],
+ default = "auto",
+ ),
+ "goos": attr.string(
+ values = GOOS.keys() + ["auto"],
+ default = "auto",
+ ),
+ "goarch": attr.string(
+ values = GOARCH.keys() + ["auto"],
+ default = "auto",
+ ),
"gc_goopts": attr.string_list(),
"gc_linkopts": attr.string_list(),
"linkstamp": attr.string(),
"x_defs": attr.string_dict(),
- "_go_context_data": attr.label(default=Label("@io_bazel_rules_go//:go_context_data")),
+ "_go_context_data": attr.label(default = Label("@io_bazel_rules_go//:go_context_data")),
},
executable = True,
toolchains = ["@io_bazel_rules_go//go:toolchain"],
@@ -103,7 +149,7 @@ go_tool_binary = rule(
"gc_linkopts": attr.string_list(),
"linkstamp": attr.string(),
"x_defs": attr.string_dict(),
- "_go_context_data": attr.label(default=Label("@io_bazel_rules_go//:go_context_data")),
+ "_go_context_data": attr.label(default = Label("@io_bazel_rules_go//:go_context_data")),
},
executable = True,
toolchains = ["@io_bazel_rules_go//go:bootstrap_toolchain"],