2024-07-27 02:14:27 +00:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
2022-07-07 20:11:50 +00:00
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "cobra",
|
|
|
|
srcs = [
|
2024-07-27 02:14:27 +00:00
|
|
|
"active_help.go",
|
2022-07-07 20:11:50 +00:00
|
|
|
"args.go",
|
|
|
|
"bash_completions.go",
|
2024-07-27 02:14:27 +00:00
|
|
|
"bash_completionsV2.go",
|
2022-07-07 20:11:50 +00:00
|
|
|
"cobra.go",
|
|
|
|
"command.go",
|
|
|
|
"command_notwin.go",
|
|
|
|
"command_win.go",
|
2024-07-27 02:14:27 +00:00
|
|
|
"completions.go",
|
2022-07-07 20:11:50 +00:00
|
|
|
"fish_completions.go",
|
2024-07-27 02:14:27 +00:00
|
|
|
"flag_groups.go",
|
2022-07-07 20:11:50 +00:00
|
|
|
"powershell_completions.go",
|
|
|
|
"shell_completions.go",
|
|
|
|
"zsh_completions.go",
|
|
|
|
],
|
|
|
|
importmap = "peridot.resf.org/vendor/github.com/spf13/cobra",
|
|
|
|
importpath = "github.com/spf13/cobra",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"//vendor/github.com/spf13/pflag",
|
|
|
|
] + select({
|
|
|
|
"@io_bazel_rules_go//go/platform:windows": [
|
|
|
|
"//vendor/github.com/inconshreveable/mousetrap",
|
|
|
|
],
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
|
|
|
)
|
2024-07-27 02:14:27 +00:00
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "cobra_test",
|
|
|
|
srcs = [
|
|
|
|
"active_help_test.go",
|
|
|
|
"args_test.go",
|
|
|
|
"bash_completionsV2_test.go",
|
|
|
|
"bash_completions_test.go",
|
|
|
|
"cobra_test.go",
|
|
|
|
"command_test.go",
|
|
|
|
"completions_test.go",
|
|
|
|
"fish_completions_test.go",
|
|
|
|
"flag_groups_test.go",
|
|
|
|
"powershell_completions_test.go",
|
|
|
|
"zsh_completions_test.go",
|
|
|
|
],
|
|
|
|
embed = [":cobra"],
|
|
|
|
deps = ["//vendor/github.com/spf13/pflag"],
|
|
|
|
)
|