Skip to content

Instantly share code, notes, and snippets.

@hsyed
Created March 14, 2017 01:29
Show Gist options
  • Save hsyed/c4736a6bebb235f7a782db153192099f to your computer and use it in GitHub Desktop.
Save hsyed/c4736a6bebb235f7a782db153192099f to your computer and use it in GitHub Desktop.
# remove the newline after the next line and it won't work.
# gazelle:ignore
load("@io_bazel_rules_go//go:def.bzl", "go_library")
config_setting(
name = "darwin",
values = {"cpu": "darwin"},
)
# TODO Learn the syntax -- surely there must be a better way!
go_library(
name = "go_default_library",
srcs = select({
":darwin": [
"alt_exit.go",
"doc.go",
"entry.go",
"exported.go",
"formatter.go",
"hooks.go",
"json_formatter.go",
"logger.go",
"logrus.go",
"terminal_bsd.go",
"terminal_notwindows.go",
"text_formatter.go",
"writer.go",
],
"//conditions:default": [
"alt_exit.go",
"doc.go",
"entry.go",
"exported.go",
"formatter.go",
"hooks.go",
"json_formatter.go",
"logger.go",
"logrus.go",
"terminal_linux.go",
"terminal_notwindows.go",
"text_formatter.go",
"writer.go",
],
}),
visibility = ["//visibility:public"],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment