diff --git a/vendor/k8s.io/repo-infra/.bazelignore b/vendor/k8s.io/repo-infra/.bazelignore new file mode 100644 index 0000000000..6b8710a711 --- /dev/null +++ b/vendor/k8s.io/repo-infra/.bazelignore @@ -0,0 +1 @@ +.git diff --git a/vendor/k8s.io/repo-infra/.bazelrc b/vendor/k8s.io/repo-infra/.bazelrc new file mode 100644 index 0000000000..ce59f93fdd --- /dev/null +++ b/vendor/k8s.io/repo-infra/.bazelrc @@ -0,0 +1,55 @@ +build --verbose_failures +test --test_output=errors + +# TODO(fejta): figure out why this causes problems +#test --features=race # enable data race detection + +# Note needs an instance name +# https://github.com/bazelbuild/bazel-toolchains/blob/master/bazelrc/bazel-0.27.0.bazelrc +build:remote --jobs=500 +build:remote --host_javabase=@rbe_default//java:jdk +build:remote --javabase=@rbe_default//java:jdk +build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 +build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 +build:remote --crosstool_top=@rbe_default//cc:toolchain +build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 + +build:remote --extra_toolchains=@rbe_default//config:cc-toolchain +build:remote --extra_execution_platforms=@io_k8s_repo_infra//:rbe_with_network +build:remote --host_platform=@io_k8s_repo_infra//:rbe_with_network +build:remote --platforms=@io_k8s_repo_infra//:rbe_with_network + +build:remote --define=EXECUTOR=remote +build:remote --remote_executor=grpcs://remotebuildexecution.googleapis.com +build:remote --remote_timeout=3600 + +# Alt: --google_credentials=some_file.json +build:remote --google_default_credentials=true + +# Improve cache hit rate +build:remote --incompatible_strict_action_env=true + +# Minimize what is downloaded +build:inmemory --experimental_inmemory_jdeps_files +build:inmemory --experimental_inmemory_dotd_files + +# Minimize what is downloaded +build:toplevel --config=inmemory +build:toplevel --experimental_remote_download_outputs=toplevel + +build:minimal --config=inmemory +build:minimal --experimental_remote_download_outputs=minimal + +build:remote --config=toplevel + +run:remote --experimental_remote_download_outputs=all --noexperimental_inmemory_jdeps_files --noexperimental_inmemory_dotd_files + +# Compose the remote configs with an instance name +# A couple examples below: + +# --config=ci-instance adds the instance name +build:ci-instance --remote_instance_name=projects/k8s-prow-builds/instances/default_instance + +# Config we want to use in ci +build:ci --config=remote --config=ci-instance +build:ci --noshow_progress diff --git a/vendor/k8s.io/repo-infra/.bazelversion b/vendor/k8s.io/repo-infra/.bazelversion new file mode 100644 index 0000000000..ccbccc3dc6 --- /dev/null +++ b/vendor/k8s.io/repo-infra/.bazelversion @@ -0,0 +1 @@ +2.2.0 diff --git a/vendor/k8s.io/repo-infra/.gitignore b/vendor/k8s.io/repo-infra/.gitignore new file mode 100644 index 0000000000..820ec5cdbb --- /dev/null +++ b/vendor/k8s.io/repo-infra/.gitignore @@ -0,0 +1,12 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +/bazel-* +/_output + +# Vim-related files +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ diff --git a/vendor/k8s.io/repo-infra/.golangci.yml b/vendor/k8s.io/repo-infra/.golangci.yml new file mode 100644 index 0000000000..f93130353a --- /dev/null +++ b/vendor/k8s.io/repo-infra/.golangci.yml @@ -0,0 +1,28 @@ +run: + deadline: 180s + tests: true + skip-dirs: + - .git + - .tool + - vendor + - verify + +linters-settings: + dupl: + threshold: 100 + gocyclo: + min-complexity: 50 + +linters: + enable: + - govet + - deadcode + - golint + - gocyclo + disable-all: true + +issues: + exclude-rules: + - linters: + - golint + text: ".*should not use dot dot imports" diff --git a/vendor/k8s.io/repo-infra/.kazelcfg.json b/vendor/k8s.io/repo-infra/.kazelcfg.json new file mode 100644 index 0000000000..49de0ce362 --- /dev/null +++ b/vendor/k8s.io/repo-infra/.kazelcfg.json @@ -0,0 +1,4 @@ +{ + "GoPrefix": "k8s.io/repo-infra", + "AddSourcesRules": true +} diff --git a/vendor/k8s.io/repo-infra/BUILD.bazel b/vendor/k8s.io/repo-infra/BUILD.bazel new file mode 100644 index 0000000000..52340ba6ba --- /dev/null +++ b/vendor/k8s.io/repo-infra/BUILD.bazel @@ -0,0 +1,82 @@ +# gazelle:prefix k8s.io/repo-infra +# gazelle:exclude hack +# gazelle:proto disable + +# Use the Bazel-vendored protobuf library since we use go_proto_library +# gazelle:resolve go github.com/golang/protobuf/proto @com_github_golang_protobuf//proto:go_default_library + +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load("//defs:run_in_workspace.bzl", "workspace_binary") + +workspace_binary( + name = "gofmt", + cmd = "@go_sdk//:bin/gofmt", +) + +workspace_binary( + name = "go", + cmd = "@go_sdk//:bin/go", +) + +workspace_binary( + name = "kazel", + cmd = "//cmd/kazel", +) + +workspace_binary( + name = "golangci-lint", + cmd = "@com_github_golangci_golangci_lint//cmd/golangci-lint", +) + +workspace_binary( + name = "buildifier", + cmd = "@com_github_bazelbuild_buildtools//buildifier", +) + +load("@bazel_gazelle//:def.bzl", "gazelle") + +gazelle(name = "gazelle") + +exports_files([".kazelcfg.json"]) + +filegroup( + name = "package-srcs", + srcs = glob( + ["**"], + exclude = [ + "bazel-*/**", + ".git/**", + ], + ), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//cmd/kazel:all-srcs", + "//defs:all-srcs", + "//hack:all-srcs", + "//tools/build_tar:all-srcs", + "//verify:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) + +platform( + name = "rbe_with_network", + parents = ["@rbe_default//config:platform"], + remote_execution_properties = """ + properties: { + name: "dockerNetwork" + value: "standard" + } + {PARENT_REMOTE_EXECUTION_PROPERTIES} + """, +) diff --git a/vendor/k8s.io/repo-infra/CONTRIBUTING.md b/vendor/k8s.io/repo-infra/CONTRIBUTING.md new file mode 100644 index 0000000000..ef37eb0b61 --- /dev/null +++ b/vendor/k8s.io/repo-infra/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# Contributing + +Thanks for taking the time to join our community and start contributing! + +The [Contributor Guide](https://github.com/kubernetes/community/blob/master/contributors/guide/README.md) +provides detailed instructions on how to get your ideas and bug fixes seen and accepted. + +Please remember to sign the [CNCF CLA](https://github.com/kubernetes/community/blob/master/CLA.md) and +read and observe the [Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). diff --git a/vendor/k8s.io/repo-infra/LICENSE b/vendor/k8s.io/repo-infra/LICENSE new file mode 100644 index 0000000000..8dada3edaf --- /dev/null +++ b/vendor/k8s.io/repo-infra/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/k8s.io/repo-infra/OWNERS b/vendor/k8s.io/repo-infra/OWNERS new file mode 100644 index 0000000000..352371c646 --- /dev/null +++ b/vendor/k8s.io/repo-infra/OWNERS @@ -0,0 +1,8 @@ +approvers: +- BenTheElder +- clarketm +- fejta +- mikedanese + +emeritus_approvers: +- ixdy diff --git a/vendor/k8s.io/repo-infra/README.md b/vendor/k8s.io/repo-infra/README.md new file mode 100644 index 0000000000..9bc8e1683f --- /dev/null +++ b/vendor/k8s.io/repo-infra/README.md @@ -0,0 +1,65 @@ +# Kubernetes repository infrastructure +[![Build Status](https://travis-ci.org/kubernetes/repo-infra.svg?branch=master)](https://travis-ci.org/kubernetes/repo-infra) [![Go Report Card](https://goreportcard.com/badge/github.com/kubernetes/repo-infra)](https://goreportcard.com/report/github.com/kubernetes/repo-infra) + +This repository contains repository infrastructure tools for use in +`kubernetes` and `kubernetes-incubator` repositories. Examples: + +- Boilerplate verification +- Go source code quality verification +- Golang build infrastructure + +--- + +## Using this repository + +This repository can be used via some golang "vendoring" mechanism +(such as glide), or it can be used via +[git subtree](http://git.kernel.org/cgit/git/git.git/plain/contrib/subtree/git-subtree.txt). + +### Using "vendoring" + +The exact mechanism to pull in this repository will vary depending on +the tool you use. However, unless you end up having this repository +at the root of your project's repository you will probably need to +make sure you use the `--rootdir` command line parameter to let the +`verify-boilerplate.sh` know its location, eg: + + verify-boilerplate.sh --rootdir=/home/myrepo + +### Using `git subtree` + +When using the git subtree mechanism, this repository should be placed in the +top level of your project. + +To add `repo-infra` to your repository, use the following commands from the +root directory of **your** repository. + +First, add a git remote for the `repo-infra` repository: + +``` +$ git remote add repo-infra git://github.com/kubernetes/repo-infra +``` + +This is not strictly necessary, but reduces the typing required for subsequent +commands. + +Next, use `git subtree add` to create a new subtree in the `repo-infra` +directory within your project: + +``` +$ git subtree add -P repo-infra repo-infra master --squash +``` + +After this command, you will have: + +1. A `repo-infra` directory in your project containing the content of **this** + project +2. 2 new commits in the active branch: + 1. A commit that squashes the git history of the `repo-infra` project + 2. A merge commit whose ancestors are: + 1. The `HEAD` of the branch prior to when you ran `git subtree add` + 2. The commit containing the squashed `repo-infra` commits + +### Contributing + +Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute. diff --git a/vendor/k8s.io/repo-infra/SECURITY_CONTACTS b/vendor/k8s.io/repo-infra/SECURITY_CONTACTS new file mode 100644 index 0000000000..f5fb5c9414 --- /dev/null +++ b/vendor/k8s.io/repo-infra/SECURITY_CONTACTS @@ -0,0 +1,14 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Committee to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +ixdy +mikedanese diff --git a/vendor/k8s.io/repo-infra/WORKSPACE b/vendor/k8s.io/repo-infra/WORKSPACE new file mode 100644 index 0000000000..41600da030 --- /dev/null +++ b/vendor/k8s.io/repo-infra/WORKSPACE @@ -0,0 +1,12 @@ +# gazelle:repository_macro repos.bzl%go_repositories +workspace(name = "io_k8s_repo_infra") + +load("//:load.bzl", "repositories") + +repositories() + +load("//:repos.bzl", "configure", "repo_infra_go_repositories") + +configure() + +repo_infra_go_repositories() diff --git a/vendor/k8s.io/repo-infra/cmd/kazel/BUILD.bazel b/vendor/k8s.io/repo-infra/cmd/kazel/BUILD.bazel new file mode 100644 index 0000000000..2f9c6bc475 --- /dev/null +++ b/vendor/k8s.io/repo-infra/cmd/kazel/BUILD.bazel @@ -0,0 +1,55 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_binary", + "go_library", + "go_test", +) + +go_binary( + name = "kazel", + embed = [":go_default_library"], +) + +go_library( + name = "go_default_library", + srcs = [ + "config.go", + "diff.go", + "generator.go", + "kazel.go", + "sourcerer.go", + ], + importpath = "k8s.io/repo-infra/cmd/kazel", + deps = [ + "@com_github_bazelbuild_buildtools//build:go_default_library", + "@io_k8s_klog_v2//:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "generator_test.go", + "kazel_test.go", + ], + embed = [":go_default_library"], + deps = ["@com_github_bazelbuild_buildtools//build:go_default_library"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/repo-infra/cmd/kazel/README.rst b/vendor/k8s.io/repo-infra/cmd/kazel/README.rst new file mode 100644 index 0000000000..2cc96aee7c --- /dev/null +++ b/vendor/k8s.io/repo-infra/cmd/kazel/README.rst @@ -0,0 +1,90 @@ +kazel - a BUILD file generator for go and bazel +=============================================== + +Requirements: +############# + +* Your project must be somewhat compatible with go tool because + kazel uses go tool to parse your import tree. +* You must have a **GOPATH** and **GOROOT** setup and your project must + be in the correct location in your **GOPATH**. +* Your ``./vendor`` directory may not contain ``BUILD`` files. + +Usage: +###### + +1. Get kazel by running ``go get k8s.io/repo-infra/kazel``. + +2. Create a ``.kazelcfg.json`` in the root of the repository. For the + kazel repository, the ``.kazelcfg.json`` would look like: + + .. code-block:: json + + { + "GoPrefix": "k8s.io/repo-infra", + "SrcDirs": [ + "./kazel" + ], + "SkippedPaths": [ + ".*foobar(baz)?.*$" + ] + } + +3. Run kazel: + + .. code-block:: bash + + $ kazel -root=$GOPATH/src/k8s.io/repo-infra + +Defaults: +######### + +* **SrcDirs** in ``.kazelcfg.json`` defaults to ``["./"]`` +* ``-root`` option defaults to the current working directory + +Automanagement: +############### + +kazel reconciles rules that have the "**automanaged**" tag. If +you no longer want kazel to manage a rule, you can remove the +**automanaged** tag and kazel will no longer manage that rule. + +kazel only manages srcs, deps, and library attributes of a +rule after initial creation so you can add and managed other +attributes like data and copts and kazel will respect your +changes. + +kazel automatically formats all ``BUILD`` files in your repository +except for those matching **SkippedPaths**. + +Adding "sources" rules: +####################### + +If you set "**AddSourcesRules**": ``true`` in your ``.kazelcfg.json``, +kazel will create "**package-srcs**" and "**all-srcs**" rules in every +package. + +The "**package-srcs**" rule is a glob matching all files in the +package recursively, but not any files owned by packages in +subdirectories. + +The "**all-srcs**" rule includes both the "**package-srcs**" rule and +the "**all-srcs**" rules of all subpackages; i.e. **//:all-srcs** will +include all files in your repository. + +The "**package-srcs**" rule defaults to private visibility, +since it is safer to depend on the "**all-srcs**" rule: if a +subpackage is added, the "**package-srcs**" rule will no longer +include those files. + +You can remove the "**automanaged**" tag from the "**package-srcs**" +rule if you need to modify the glob (such as adding excludes). +It's recommended that you leave the "**all-srcs**" rule +automanaged. + +Validating BUILD files in CI: +############################# + +If you run kazel with ``--validate``, it will not update any ``BUILD`` files, but it +will exit nonzero if any ``BUILD`` files are out-of-date. You can add ``--print-diff`` +to print out the changes needed. diff --git a/vendor/k8s.io/repo-infra/cmd/kazel/config.go b/vendor/k8s.io/repo-infra/cmd/kazel/config.go new file mode 100644 index 0000000000..3d2363196c --- /dev/null +++ b/vendor/k8s.io/repo-infra/cmd/kazel/config.go @@ -0,0 +1,70 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "encoding/json" + "io/ioutil" +) + +// Cfg defines the configuration options for kazel. +type Cfg struct { + GoPrefix string + // evaluated recursively, defaults to ["."] + SrcDirs []string + // regexps that match packages to skip + SkippedPaths []string + // regexps that match packages to skip for k8s codegen. + // note that this skips anything matched by SkippedPaths as well. + SkippedK8sCodegenPaths []string + // whether to add "pkg-srcs" and "all-srcs" filegroups + // note that this operates on the entire tree (not just SrcsDirs) but skips anything matching SkippedPaths + AddSourcesRules bool + // whether to have multiple build files in vendor/ or just one. + VendorMultipleBuildFiles bool + // Whether to manage the upstream Go rules provided by bazelbuild/rules_go. + // If using gazelle, set this to false (or omit). + ManageGoRules bool + // If defined, metadata parsed from "+k8s:" codegen build tags will be saved into this file. + K8sCodegenBzlFile string + // If defined, contains the boilerplate text to be included in the header of the generated bzl file. + K8sCodegenBoilerplateFile string + // Which tags to include in the codegen bzl file. + // Include only the name of the tag. + // For example, to include +k8s:foo=bar, list "foo" here. + K8sCodegenTags []string +} + +// ReadCfg reads and unmarshals the specified json file into a Cfg struct. +func ReadCfg(cfgPath string) (*Cfg, error) { + b, err := ioutil.ReadFile(cfgPath) + if err != nil { + return nil, err + } + var cfg Cfg + if err := json.Unmarshal(b, &cfg); err != nil { + return nil, err + } + defaultCfg(&cfg) + return &cfg, nil +} + +func defaultCfg(c *Cfg) { + if len(c.SrcDirs) == 0 { + c.SrcDirs = []string{"."} + } +} diff --git a/vendor/k8s.io/repo-infra/cmd/kazel/diff.go b/vendor/k8s.io/repo-infra/cmd/kazel/diff.go new file mode 100644 index 0000000000..37bed9381c --- /dev/null +++ b/vendor/k8s.io/repo-infra/cmd/kazel/diff.go @@ -0,0 +1,60 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "io/ioutil" + "os" + "os/exec" +) + +// Diff prints the unified diff of the two provided byte slices +// using the unix diff command. +func Diff(left, right []byte) error { + lf, err := ioutil.TempFile("/tmp", "actual-file-") + if err != nil { + return err + } + defer lf.Close() + defer os.Remove(lf.Name()) + + rf, err := ioutil.TempFile("/tmp", "expected-file-") + if err != nil { + return err + } + defer rf.Close() + defer os.Remove(rf.Name()) + + _, err = lf.Write(left) + if err != nil { + return err + } + lf.Close() + + _, err = rf.Write(right) + if err != nil { + return err + } + rf.Close() + + cmd := exec.Command("/usr/bin/diff", "-u", lf.Name(), rf.Name()) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + cmd.Run() + + return nil +} diff --git a/vendor/k8s.io/repo-infra/cmd/kazel/generator.go b/vendor/k8s.io/repo-infra/cmd/kazel/generator.go new file mode 100644 index 0000000000..2cb8c0fc7e --- /dev/null +++ b/vendor/k8s.io/repo-infra/cmd/kazel/generator.go @@ -0,0 +1,178 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "io/ioutil" + "os" + "path/filepath" + "regexp" + "sort" + "strings" + + "github.com/bazelbuild/buildtools/build" +) + +var ( + // Generator tags are specified using the format "// +k8s:name=value" + genTagRe = regexp.MustCompile(`//\s*\+k8s:([^\s=]+)(?:=(\S+))\s*\n`) +) + +// {tagName: {value: {pkgs}}} or {tagName: {pkg: {values}}} +type generatorTagsMap map[string]map[string]map[string]bool + +// extractTags finds k8s codegen tags found in b listed in requestedTags. +// It returns a map of {tag name: slice of values for that tag}. +func extractTags(b []byte, requestedTags map[string]bool) map[string][]string { + tags := make(map[string][]string) + matches := genTagRe.FindAllSubmatch(b, -1) + for _, m := range matches { + if len(m) >= 3 { + tag, values := string(m[1]), string(m[2]) + if _, requested := requestedTags[tag]; !requested { + continue + } + tags[tag] = append(tags[tag], strings.Split(values, ",")...) + } + } + return tags +} + +// findGeneratorTags searches for all packages under root that include a kubernetes generator +// tag comment. It does not follow symlinks, and any path in the configured skippedPaths +// or codegen skipped paths is skipped. +func (v *Vendorer) findGeneratorTags(root string, requestedTags map[string]bool) (tagsValuesPkgs, tagsPkgsValues generatorTagsMap, err error) { + tagsValuesPkgs = make(generatorTagsMap) + tagsPkgsValues = make(generatorTagsMap) + + err = filepath.Walk(root, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + pkg := filepath.Dir(path) + + for _, r := range v.skippedK8sCodegenPaths { + if r.MatchString(pkg) { + return filepath.SkipDir + } + } + + if !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") { + return nil + } + + b, err := ioutil.ReadFile(path) + if err != nil { + return err + } + + for tag, values := range extractTags(b, requestedTags) { + if _, present := tagsValuesPkgs[tag]; !present { + tagsValuesPkgs[tag] = make(map[string]map[string]bool) + } + if _, present := tagsPkgsValues[tag]; !present { + tagsPkgsValues[tag] = make(map[string]map[string]bool) + } + if _, present := tagsPkgsValues[tag][pkg]; !present { + tagsPkgsValues[tag][pkg] = make(map[string]bool) + } + for _, v := range values { + if _, present := tagsValuesPkgs[tag][v]; !present { + tagsValuesPkgs[tag][v] = make(map[string]bool) + } + // Since multiple files in the same package may list a given tag/value, use a set to deduplicate. + tagsValuesPkgs[tag][v][pkg] = true + tagsPkgsValues[tag][pkg][v] = true + } + } + + return nil + }) + + if err != nil { + return nil, nil, err + } + + return +} + +// flattened returns a copy of the map with the final stringSet flattened into a sorted slice. +func flattened(m generatorTagsMap) map[string]map[string][]string { + flattened := make(map[string]map[string][]string) + for tag, subMap := range m { + flattened[tag] = make(map[string][]string) + for k, subSet := range subMap { + for v := range subSet { + flattened[tag][k] = append(flattened[tag][k], v) + } + sort.Strings(flattened[tag][k]) + } + } + return flattened +} + +// walkGenerated generates a k8s codegen bzl file that can be parsed by Starlark +// rules and macros to find packages needed k8s code generation. +// This involves reading all non-test go sources in the tree and looking for +// "+k8s:name=value" tags. Only those tags listed in K8sCodegenTags will be +// included. +// If a K8sCodegenBoilerplateFile was configured, the contents of this file +// will be included as the header of the generated bzl file. +// Returns true if there are diffs against the existing generated bzl file. +func (v *Vendorer) walkGenerated() (bool, error) { + if v.cfg.K8sCodegenBzlFile == "" { + return false, nil + } + // only include the specified tags + requestedTags := make(map[string]bool) + for _, tag := range v.cfg.K8sCodegenTags { + requestedTags[tag] = true + } + tagsValuesPkgs, tagsPkgsValues, err := v.findGeneratorTags(".", requestedTags) + if err != nil { + return false, err + } + + f := &build.File{ + Path: v.cfg.K8sCodegenBzlFile, + } + addCommentBefore(f, "#################################################") + addCommentBefore(f, "# # # # # # # # # # # # # # # # # # # # # # # # #") + addCommentBefore(f, "This file is autogenerated by kazel. DO NOT EDIT.") + addCommentBefore(f, "# # # # # # # # # # # # # # # # # # # # # # # # #") + addCommentBefore(f, "#################################################") + addCommentBefore(f, "") + + f.Stmt = append(f.Stmt, varExpr("go_prefix", "The go prefix passed to kazel", v.cfg.GoPrefix)) + f.Stmt = append(f.Stmt, varExpr("kazel_configured_tags", "The list of codegen tags kazel is configured to find", v.cfg.K8sCodegenTags)) + f.Stmt = append(f.Stmt, varExpr("tags_values_pkgs", "tags_values_pkgs is a dictionary mapping {k8s build tag: {tag value: [pkgs including that tag:value]}}", flattened(tagsValuesPkgs))) + f.Stmt = append(f.Stmt, varExpr("tags_pkgs_values", "tags_pkgs_values is a dictionary mapping {k8s build tag: {pkg: [tag values in pkg]}}", flattened(tagsPkgsValues))) + + var boilerplate []byte + if v.cfg.K8sCodegenBoilerplateFile != "" { + boilerplate, err = ioutil.ReadFile(v.cfg.K8sCodegenBoilerplateFile) + if err != nil { + return false, err + } + } + // Open existing file to use in diff mode. + _, err = os.Stat(f.Path) + if err != nil && !os.IsNotExist(err) { + return false, err + } + return writeFile(f.Path, f, boilerplate, !os.IsNotExist(err), v.dryRun) +} diff --git a/vendor/k8s.io/repo-infra/cmd/kazel/generator_test.go b/vendor/k8s.io/repo-infra/cmd/kazel/generator_test.go new file mode 100644 index 0000000000..b5653e6ce4 --- /dev/null +++ b/vendor/k8s.io/repo-infra/cmd/kazel/generator_test.go @@ -0,0 +1,122 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "reflect" + "testing" +) + +func TestExtractTags(t *testing.T) { + requestedTags := map[string]bool{ + "foo-gen": true, + "baz-gen": true, + "quux-gen:with-extra@things": true, + } + var testCases = []struct { + src string + want map[string][]string + }{ + { + src: "// +k8s:foo-gen=a,b\n", + want: map[string][]string{"foo-gen": {"a", "b"}}, + }, + { + src: "// +k8s:bar-gen=a,b\n", + want: map[string][]string{}, + }, + { + src: "// +k8s:quux-gen=true\n", + want: map[string][]string{}, + }, + { + src: "// +k8s:quux-gen:with-extra@things=123\n", + want: map[string][]string{"quux-gen:with-extra@things": {"123"}}, + }, + { + src: `/* +This is a header. +*/ +// +k8s:foo-gen=first +// +k8s:bar-gen=true +// +build linux + +// +k8s:baz-gen=1,2,a +// +k8s:baz-gen=b + +// k8s:foo-gen=not-this-one +// commenting out this one too +k8s:foo-gen=disabled +// +k8s:foo-gen=ignore this one too + +// Let's repeat one! +// +k8s:baz-gen=b +// +k8s:foo-gen=last + +import "some package" +`, + want: map[string][]string{ + "foo-gen": {"first", "last"}, + "baz-gen": {"1", "2", "a", "b", "b"}, + }, + }, + } + + for _, testCase := range testCases { + result := extractTags([]byte(testCase.src), requestedTags) + if !reflect.DeepEqual(result, testCase.want) { + t.Errorf("extractTags(%v) = %v; want %v", testCase.src, result, testCase.want) + } + } +} + +func TestFlattened(t *testing.T) { + m := generatorTagsMap{ + "foo-gen": { + "a": { + "pkg/one": true, + "pkg/two": true, + }, + }, + "bar-gen": { + "true": { + "pkg/one": true, + "pkg/three": true, + // also test sorting - this should end up at the front of the slice + "a/pkg": true, + }, + "false": { + "pkg/one": true, + }, + }, + } + + want := map[string]map[string][]string{ + "foo-gen": { + "a": {"pkg/one", "pkg/two"}, + }, + "bar-gen": { + "true": {"a/pkg", "pkg/one", "pkg/three"}, + "false": {"pkg/one"}, + }, + } + + result := flattened(m) + if !reflect.DeepEqual(result, want) { + t.Errorf("flattened(%v) = %v; want %v", m, result, want) + } + +} diff --git a/vendor/k8s.io/repo-infra/cmd/kazel/kazel.go b/vendor/k8s.io/repo-infra/cmd/kazel/kazel.go new file mode 100644 index 0000000000..644c3dfb37 --- /dev/null +++ b/vendor/k8s.io/repo-infra/cmd/kazel/kazel.go @@ -0,0 +1,402 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "bytes" + "flag" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "reflect" + "regexp" + "sort" + + "github.com/bazelbuild/buildtools/build" + + "k8s.io/klog/v2" +) + +const ( + automanagedTag = "automanaged" +) + +var ( + root = flag.String("root", ".", "root of go source") + dryRun = flag.Bool("dry-run", false, "run in dry mode") + printDiff = flag.Bool("print-diff", false, "print diff to stdout") + validate = flag.Bool("validate", false, "run in dry mode and exit nonzero if any BUILD files need to be updated") + cfgPath = flag.String("cfg-path", ".kazelcfg.json", "path to kazel config (relative paths interpreted relative to -repo.") +) + +func main() { + flag.Parse() + flag.Set("alsologtostderr", "true") + if *root == "" { + klog.Fatalf("-root argument is required") + } + if *validate { + *dryRun = true + } + v, err := newVendorer(*root, *cfgPath, *dryRun) + if err != nil { + klog.Fatalf("unable to build vendorer: %v", err) + } + if err = os.Chdir(v.root); err != nil { + klog.Fatalf("cannot chdir into root %q: %v", v.root, err) + } + if v.cfg.ManageGoRules { + klog.Fatalf("kazel no longer supports managing Go rules") + } + + wroteGenerated := false + if wroteGenerated, err = v.walkGenerated(); err != nil { + klog.Fatalf("err walking generated: %v", err) + } + if _, err = v.walkSource("."); err != nil { + klog.Fatalf("err walking source: %v", err) + } + written := 0 + if written, err = v.reconcileAllRules(); err != nil { + klog.Fatalf("err reconciling rules: %v", err) + } + if wroteGenerated { + written++ + } + if *validate && written > 0 { + fmt.Fprintf(os.Stderr, "\n%d BUILD files not up-to-date.\n", written) + os.Exit(1) + } +} + +// Vendorer collects context, configuration, and cache while walking the tree. +type Vendorer struct { + skippedPaths []*regexp.Regexp + skippedK8sCodegenPaths []*regexp.Regexp + dryRun bool + root string + cfg *Cfg + newRules map[string][]*build.Rule // package path -> list of rules to add or update + managedAttrs []string // which rule attributes kazel will overwrite +} + +func newVendorer(root, cfgPath string, dryRun bool) (*Vendorer, error) { + absRoot, err := filepath.Abs(root) + if err != nil { + return nil, fmt.Errorf("could not get absolute path: %v", err) + } + if !filepath.IsAbs(cfgPath) { + cfgPath = filepath.Join(absRoot, cfgPath) + } + cfg, err := ReadCfg(cfgPath) + if err != nil { + return nil, err + } + + v := Vendorer{ + dryRun: dryRun, + root: absRoot, + cfg: cfg, + newRules: make(map[string][]*build.Rule), + managedAttrs: []string{"srcs"}, + } + + builtIn, err := compileSkippedPaths([]string{"^\\.git", "^bazel-*"}) + if err != nil { + return nil, err + } + + sp, err := compileSkippedPaths(cfg.SkippedPaths) + if err != nil { + return nil, err + } + sp = append(builtIn, sp...) + v.skippedPaths = sp + + sop, err := compileSkippedPaths(cfg.SkippedK8sCodegenPaths) + if err != nil { + return nil, err + } + v.skippedK8sCodegenPaths = append(sop, sp...) + + return &v, nil + +} + +func writeRules(file *build.File, rules []*build.Rule) { + for _, rule := range rules { + file.Stmt = append(file.Stmt, rule.Call) + } +} + +func (v *Vendorer) addRules(pkgPath string, rules []*build.Rule) { + cleanPath := filepath.Clean(pkgPath) + v.newRules[cleanPath] = append(v.newRules[cleanPath], rules...) +} + +func (v *Vendorer) reconcileAllRules() (int, error) { + var paths []string + for path := range v.newRules { + paths = append(paths, path) + } + sort.Strings(paths) + written := 0 + for _, path := range paths { + w, err := ReconcileRules(path, v.newRules[path], v.managedAttrs, v.dryRun) + if w { + written++ + } + if err != nil { + return written, err + } + } + return written, nil +} + +// addCommentBefore adds a whole-line comment before the provided Expr. +func addCommentBefore(e build.Expr, comment string) { + c := e.Comment() + c.Before = append(c.Before, build.Comment{Token: fmt.Sprintf("# %s", comment)}) +} + +// varExpr creates a variable expression of the form "name = expr". +// v will be converted into an appropriate Expr using asExpr. +// The optional description will be included as a comment before the expression. +func varExpr(name, desc string, v interface{}) build.Expr { + e := &build.BinaryExpr{ + X: &build.LiteralExpr{Token: name}, + Op: "=", + Y: asExpr(v), + } + if desc != "" { + addCommentBefore(e, desc) + } + return e +} + +// rvSliceLessFunc returns a function that can be used with sort.Slice() or sort.SliceStable() +// to sort a slice of reflect.Values. +// It sorts ints and floats as their native kinds, and everything else as a string. +func rvSliceLessFunc(k reflect.Kind, vs []reflect.Value) func(int, int) bool { + switch k { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return func(i, j int) bool { return vs[i].Int() < vs[j].Int() } + case reflect.Float32, reflect.Float64: + return func(i, j int) bool { return vs[i].Float() < vs[j].Float() } + default: + return func(i, j int) bool { + return fmt.Sprintf("%v", vs[i]) < fmt.Sprintf("%v", vs[j]) + } + } +} + +// asExpr converts a native Go type into the equivalent Starlark expression using reflection. +// The keys of maps will be sorted for reproducibility. +func asExpr(e interface{}) build.Expr { + rv := reflect.ValueOf(e) + switch rv.Kind() { + case reflect.Bool: + return &build.LiteralExpr{Token: fmt.Sprintf("%t", e)} + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return &build.LiteralExpr{Token: fmt.Sprintf("%d", e)} + case reflect.Float32, reflect.Float64: + return &build.LiteralExpr{Token: fmt.Sprintf("%g", e)} + case reflect.String: + return &build.StringExpr{Value: e.(string)} + case reflect.Slice, reflect.Array: + var list []build.Expr + for i := 0; i < rv.Len(); i++ { + list = append(list, asExpr(rv.Index(i).Interface())) + } + return &build.ListExpr{List: list} + case reflect.Map: + var list []build.Expr + keys := rv.MapKeys() + sort.SliceStable(keys, rvSliceLessFunc(rv.Type().Key().Kind(), keys)) + for _, key := range keys { + list = append(list, &build.KeyValueExpr{ + Key: asExpr(key.Interface()), + Value: asExpr(rv.MapIndex(key).Interface()), + }) + } + return &build.DictExpr{List: list} + default: + klog.Fatalf("unhandled kind: %q for value: %q", rv.Kind(), rv) + return nil + } +} + +func newRule(rt, name string, attrs map[string]build.Expr) *build.Rule { + rule := &build.Rule{ + Call: &build.CallExpr{ + X: &build.LiteralExpr{Token: rt}, + }, + } + rule.SetAttr("name", asExpr(name)) + for k, v := range attrs { + rule.SetAttr(k, v) + } + rule.SetAttr("tags", asExpr([]string{automanagedTag})) + return rule +} + +// findBuildFile determines the name of a preexisting BUILD file, returning +// a default if no such file exists. +func findBuildFile(pkgPath string) (bool, string) { + options := []string{"BUILD.bazel", "BUILD"} + for _, b := range options { + path := filepath.Join(pkgPath, b) + info, err := os.Stat(path) + if err == nil && !info.IsDir() { + return true, path + } + } + return false, filepath.Join(pkgPath, "BUILD.bazel") +} + +// ReconcileRules reconciles, simplifies, and writes the rules for the specified package, adding +// additional dependency rules as needed. +func ReconcileRules(pkgPath string, rules []*build.Rule, managedAttrs []string, dryRun bool) (bool, error) { + _, path := findBuildFile(pkgPath) + info, err := os.Stat(path) + if err != nil && os.IsNotExist(err) { + f := &build.File{} + writeRules(f, rules) + return writeFile(path, f, nil, false, dryRun) + } else if err != nil { + return false, err + } + if info.IsDir() { + return false, fmt.Errorf("%q cannot be a directory", path) + } + b, err := ioutil.ReadFile(path) + if err != nil { + return false, err + } + f, err := build.Parse(path, b) + if err != nil { + return false, err + } + oldRules := make(map[string]*build.Rule) + for _, r := range f.Rules("") { + oldRules[r.Name()] = r + } + for _, r := range rules { + o, ok := oldRules[r.Name()] + if !ok { + f.Stmt = append(f.Stmt, r.Call) + continue + } + if !RuleIsManaged(o) { + continue + } + reconcileAttr := func(o, n *build.Rule, name string) { + if e := n.Attr(name); e != nil { + o.SetAttr(name, e) + } else { + o.DelAttr(name) + } + } + for _, attr := range managedAttrs { + reconcileAttr(o, r, attr) + } + delete(oldRules, r.Name()) + } + + for _, r := range oldRules { + if !RuleIsManaged(r) { + continue + } + f.DelRules(r.Kind(), r.Name()) + } + + return writeFile(path, f, nil, true, dryRun) +} + +// RuleIsManaged returns whether the provided rule is managed by this tool, +// based on the tags set on the rule. +func RuleIsManaged(r *build.Rule) bool { + for _, tag := range r.AttrStrings("tags") { + if tag == automanagedTag { + return true + } + } + return false +} + +// writeFile writes out f to path, prepending boilerplate to the output. +// If exists is true, compares against the existing file specified by path, +// returning false if there are no changes. +// Otherwise, returns true. +// If dryRun is false, no files are actually changed; otherwise, the file will be written. +func writeFile(path string, f *build.File, boilerplate []byte, exists, dryRun bool) (bool, error) { + var info build.RewriteInfo + build.Rewrite(f, &info) + var out []byte + out = append(out, boilerplate...) + // double format the source file as our modification logic sometimes uses + // LiteralExpr where it should use other types of expressions, and this + // prevents issues where kazel thus formats structures incorrectly. + // :this_is_fine: + outData := build.Format(f) + var err error + f, err = build.Parse(path, outData) + if err != nil { + return false, fmt.Errorf("internal error occurred formatting file: %v", err) + } + // also call Rewrite again to run Buildifier against the results as + // visibility rules are not ordered correctly for some reason + build.Rewrite(f, &info) + out = append(out, build.Format(f)...) + if exists { + orig, err := ioutil.ReadFile(path) + if err != nil { + return false, err + } + if bytes.Compare(orig, out) == 0 { + return false, nil + } + if *printDiff { + Diff(orig, out) + } + } + if dryRun { + fmt.Fprintf(os.Stderr, "DRY-RUN: wrote %q\n", path) + return true, nil + } + werr := ioutil.WriteFile(path, out, 0644) + if werr == nil { + fmt.Fprintf(os.Stderr, "wrote %q\n", path) + } + return werr == nil, werr +} + +func compileSkippedPaths(skippedPaths []string) ([]*regexp.Regexp, error) { + regexPaths := []*regexp.Regexp{} + + for _, sp := range skippedPaths { + r, err := regexp.Compile(sp) + if err != nil { + return nil, err + } + regexPaths = append(regexPaths, r) + } + return regexPaths, nil +} diff --git a/vendor/k8s.io/repo-infra/cmd/kazel/kazel_test.go b/vendor/k8s.io/repo-infra/cmd/kazel/kazel_test.go new file mode 100644 index 0000000000..e4dd68e140 --- /dev/null +++ b/vendor/k8s.io/repo-infra/cmd/kazel/kazel_test.go @@ -0,0 +1,76 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "testing" + + "github.com/bazelbuild/buildtools/build" +) + +func TestAsExpr(t *testing.T) { + var testCases = []struct { + expr interface{} + want string + }{ + {42, "42"}, + {2.71828, "2.71828"}, + {2.718281828459045, "2.718281828459045"}, + {"a string", `"a string"`}, + // values should stay in specified order + {[]int{4, 7, 2, 9, 21}, `[ + 4, + 7, + 2, + 9, + 21, +]`}, + // keys should get sorted + {map[int]string{1: "foo", 5: "baz", 3: "bar"}, `{ + 1: "foo", + 3: "bar", + 5: "baz", +}`}, + // keys true and false should be sorted by their string representation + { + map[bool]map[string][]float64{ + true: {"b": {2, 2.2}, "a": {1, 1.1, 1.11}}, + false: {"": {}}, + }, + `{ + false: {"": []}, + true: { + "a": [ + 1, + 1.1, + 1.11, + ], + "b": [ + 2, + 2.2, + ], + }, +}`}, + } + + for _, testCase := range testCases { + result := build.FormatString(asExpr(testCase.expr)) + if result != testCase.want { + t.Errorf("asExpr(%v) = %v; want %v", testCase.expr, result, testCase.want) + } + } +} diff --git a/vendor/k8s.io/repo-infra/cmd/kazel/sourcerer.go b/vendor/k8s.io/repo-infra/cmd/kazel/sourcerer.go new file mode 100644 index 0000000000..68ef83146b --- /dev/null +++ b/vendor/k8s.io/repo-infra/cmd/kazel/sourcerer.go @@ -0,0 +1,109 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "fmt" + "io/ioutil" + "path/filepath" + + "github.com/bazelbuild/buildtools/build" +) + +const ( + pkgSrcsTarget = "package-srcs" + allSrcsTarget = "all-srcs" +) + +// walkSource walks the source tree recursively from pkgPath, adding +// any BUILD files to v.newRules to be formatted. +// +// If AddSourcesRules is enabled in the kazel config, then we additionally add +// package-sources and recursive all-srcs filegroups rules to every BUILD file. +// +// Returns the list of children all-srcs targets that should be added to the +// all-srcs rule of the enclosing package. +func (v *Vendorer) walkSource(pkgPath string) ([]string, error) { + // clean pkgPath since we access v.newRules directly + pkgPath = filepath.Clean(pkgPath) + for _, r := range v.skippedPaths { + if r.MatchString(pkgPath) { + return nil, nil + } + } + files, err := ioutil.ReadDir(pkgPath) + if err != nil { + return nil, err + } + + // Find any children packages we need to include in an all-srcs rule. + var children []string + for _, f := range files { + if f.IsDir() { + c, err := v.walkSource(filepath.Join(pkgPath, f.Name())) + if err != nil { + return nil, err + } + children = append(children, c...) + } + } + + // This path is a package either if we've added rules or if a BUILD file already exists. + _, hasRules := v.newRules[pkgPath] + isPkg := hasRules + if !isPkg { + isPkg, _ = findBuildFile(pkgPath) + } + + if !isPkg { + // This directory isn't a package (doesn't contain a BUILD file), + // but there might be subdirectories that are packages, + // so pass that up to our parent. + return children, nil + } + + // Enforce formatting the BUILD file, even if we're not adding srcs rules + if !hasRules { + v.addRules(pkgPath, nil) + } + + if !v.cfg.AddSourcesRules { + return nil, nil + } + + pkgSrcsExpr := &build.LiteralExpr{Token: `glob(["**"])`} + if pkgPath == "." { + pkgSrcsExpr = &build.LiteralExpr{Token: `glob(["**"], exclude=["bazel-*/**", ".git/**"])`} + } + + v.addRules(pkgPath, []*build.Rule{ + newRule("filegroup", + pkgSrcsTarget, + map[string]build.Expr{ + "srcs": pkgSrcsExpr, + "visibility": asExpr([]string{"//visibility:private"}), + }), + newRule("filegroup", + allSrcsTarget, + map[string]build.Expr{ + "srcs": asExpr(append(children, fmt.Sprintf(":%s", pkgSrcsTarget))), + // TODO: should this be more restricted? + "visibility": asExpr([]string{"//visibility:public"}), + }), + }) + return []string{fmt.Sprintf("//%s:%s", pkgPath, allSrcsTarget)}, nil +} diff --git a/vendor/k8s.io/repo-infra/code-of-conduct.md b/vendor/k8s.io/repo-infra/code-of-conduct.md new file mode 100644 index 0000000000..0d15c00cf3 --- /dev/null +++ b/vendor/k8s.io/repo-infra/code-of-conduct.md @@ -0,0 +1,3 @@ +# Kubernetes Community Code of Conduct + +Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/repo-infra/defs/BUILD.bazel b/vendor/k8s.io/repo-infra/defs/BUILD.bazel new file mode 100644 index 0000000000..467d7a774b --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/BUILD.bazel @@ -0,0 +1,62 @@ +load(":pkg.bzl", "pkg_tar") +load(":build.bzl", "release_filegroup") +load("@subpar//:subpar.bzl", "par_binary") + +par_binary( + name = "gcs_uploader", + srcs = [ + "gcs_uploader.py", + ], + python_version = "PY2", + visibility = ["//visibility:public"], +) + +pkg_tar( + name = "pkg_tar_smoke", + srcs = glob(["*.bzl"]), +) + +# generate the hash files to use in the sh_tests below +release_filegroup( + name = "testfile", + testonly = True, + srcs = [":testdata/testfile.txt"], +) + +[ + sh_test( + name = "test_gen%ssum" % hash, + srcs = ["diff_test.sh"], + args = [ + "$(location testdata/testfile.txt.%s.expected)" % hash, + "$(location testdata/testfile.txt.%s)" % hash, + ], + data = [ + ":testdata/testfile.txt.%s" % hash, + ":testdata/testfile.txt.%s.expected" % hash, + ], + ) + for hash in [ + "md5", + "sha1", + "sha512", + ] +] + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//defs/testgen:all-srcs", + "//defs/testpkg:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/repo-infra/defs/build.bzl b/vendor/k8s.io/repo-infra/defs/build.bzl new file mode 100644 index 0000000000..9955a7e469 --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/build.bzl @@ -0,0 +1,200 @@ +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Rules for uploading, hashing and creating release groups.""" + +def _gcs_upload_impl(ctx): + output_lines = [] + for t in ctx.attr.data: + label = str(t.label) + upload_path = ctx.attr.upload_paths.get(label, "") + for f in t.files.to_list(): + output_lines.append("%s\t%s" % (f.short_path, upload_path)) + + ctx.actions.write( + output = ctx.outputs.targets, + content = "\n".join(output_lines), + ) + + ctx.actions.write( + content = "%s --manifest %s --root $PWD -- $@" % ( + ctx.attr.uploader.files_to_run.executable.short_path, + ctx.outputs.targets.short_path, + ), + output = ctx.outputs.executable, + is_executable = True, + ) + + # TODO(fejta): migrate to provider + return struct( + runfiles = ctx.runfiles( + files = ctx.files.data + ctx.files.uploader + [ctx.info_file, ctx.version_file, ctx.outputs.targets], + ), + ) + +# Adds an executable rule to upload the specified artifacts to GCS. +# +# The keys in upload_paths must match the elaborated targets exactly; i.e., +# one must specify "//foo/bar:bar" and not just "//foo/bar". +# +# Both the upload_paths and the path supplied on the commandline can include +# Python format strings which will be replaced by values from the workspace status, +# e.g. gs://my-bucket-{BUILD_USER}/stash/{STABLE_BUILD_SCM_REVISION} +gcs_upload = rule( + attrs = { + "data": attr.label_list( + mandatory = True, + allow_files = True, + ), + "uploader": attr.label( + default = Label("//defs:gcs_uploader.par"), + allow_files = True, + ), + # TODO: combine with 'data' when label_keyed_string_dict is supported in Bazel + "upload_paths": attr.string_dict( + allow_empty = True, + ), + }, + executable = True, + outputs = { + "targets": "%{name}-targets.txt", + }, + implementation = _gcs_upload_impl, +) + +def md5sum(name, src, **kwargs): + """Computes the md5sum of the provided src file, saving it in a file named 'name'.""" + native.genrule( + name = name + "_genmd5sum", + srcs = [src], + outs = [name], + cmd = "command -v md5 >/dev/null && cmd='md5 -q' || cmd=md5sum; $$cmd $< | awk '{print $$1}' >$@", + message = "Computing md5sum", + **kwargs + ) + +def sha1sum(name, src, **kwargs): + """Computes the sha1sum of the provided src file, saving it in a file named 'name'.""" + native.genrule( + name = name + "_gensha1sum", + srcs = [src], + outs = [name], + cmd = "command -v sha1sum >/dev/null && cmd=sha1sum || cmd='shasum -a1'; $$cmd $< | awk '{print $$1}' >$@", + message = "Computing sha1sum", + **kwargs + ) + +def sha512sum(name, src, **kwargs): + """Computes the sha512sum of the provided src file, saving it in a file named 'name'.""" + native.genrule( + name = name + "_gensha512sum", + srcs = [src], + outs = [name], + cmd = "command -v sha512sum >/dev/null && cmd=sha512sum || cmd='shasum -a512'; $$cmd $< | awk '{print $$1}' >$@", + message = "Computing sha512sum", + **kwargs + ) + +def _hashes_for_srcs(srcs, srcs_basenames_needing_hashes): + """Returns a list of hash target names for the provided srcs. + + Also updates the srcs_basenames_needing_hashes dictionary, + mapping src name to basename for each target in srcs. + """ + hashes = [] + for src in srcs: + parts = src.split(":") + if len(parts) > 1: + basename = parts[1] + else: + basename = src.split("/")[-1] + + srcs_basenames_needing_hashes[src] = basename + hashes.append(basename + ".md5") + hashes.append(basename + ".sha1") + hashes.append(basename + ".sha512") + return hashes + +def release_filegroup(name, srcs = None, conditioned_srcs = None, tags = None, visibility = None, **kwargs): + """Creates a variety of filegroups.""" + # TODO(fejta): better function doc. + + # Creates 3+N rules based on the provided targets: + # * A filegroup with just the provided targets (named 'name') + # * A filegroup containing all of the md5, sha1 and sha512 hash files ('name-hashes') + # * A filegroup containing both of the above ('name-and-hashes') + # * All of the necessary md5sum, sha1sum and sha512sum rules + + # The targets are specified using the srcs and conditioned_srcs attributes. + # srcs is expected to be label list. + # conditioned_srcs is a dictionary mapping conditions to label lists. + # It will be passed to select(). + if not srcs and not conditioned_srcs: + fail("srcs and conditioned_srcs cannot both be empty") + srcs = srcs or [] + + # A given src may occur in multiple conditioned_srcs, but we want to create the hash + # rules only once, so use a dictionary to deduplicate. + srcs_basenames_needing_hashes = {} + + hashes = _hashes_for_srcs(srcs, srcs_basenames_needing_hashes) + conditioned_hashes = {} + if conditioned_srcs: + for condition, csrcs in conditioned_srcs.items(): + conditioned_hashes[condition] = _hashes_for_srcs(csrcs, srcs_basenames_needing_hashes) + + hash_tags = tags or [] + hash_tags.append("manual") + for src, basename in srcs_basenames_needing_hashes.items(): + md5sum(name = basename + ".md5", src = src, tags = hash_tags, visibility = visibility) + sha1sum(name = basename + ".sha1", src = src, tags = hash_tags, visibility = visibility) + sha512sum(name = basename + ".sha512", src = src, tags = hash_tags, visibility = visibility) + + if conditioned_srcs: + native.filegroup( + name = name, + srcs = srcs + select(conditioned_srcs), + tags = tags, + **kwargs + ) + native.filegroup( + name = name + "-hashes", + srcs = hashes + select(conditioned_hashes), + tags = tags, + visibility = visibility, + **kwargs + ) + else: + native.filegroup( + name = name, + srcs = srcs, + tags = tags, + visibility = visibility, + **kwargs + ) + native.filegroup( + name = name + "-hashes", + srcs = hashes, + tags = tags, + visibility = visibility, + **kwargs + ) + + native.filegroup( + name = name + "-and-hashes", + srcs = [name, name + "-hashes"], + tags = tags, + visibility = visibility, + **kwargs + ) diff --git a/vendor/k8s.io/repo-infra/defs/deb.bzl b/vendor/k8s.io/repo-infra/defs/deb.bzl new file mode 100644 index 0000000000..edff08e823 --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/deb.bzl @@ -0,0 +1,66 @@ +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Defines rules for creating debian packages.""" + +load("//defs:pkg.bzl", "pkg_tar") +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_deb") + +KUBERNETES_AUTHORS = "Kubernetes Authors " + +KUBERNETES_HOMEPAGE = "http://kubernetes.io" + +GOARCH_TO_DEBARCH = { + "386": "i386", + "amd64": "amd64", + "arm": "armhf", + "arm64": "arm64", + "ppc64le": "ppc64el", + "s390x": "s390x", +} + +def k8s_deb(name, goarch = "amd64", tags = None, **kwargs): + """k8s_deb calls pkg_deb for a particular architecture, setting contact info.""" + debarch = GOARCH_TO_DEBARCH[goarch] + pkg_deb( + name = name + "-" + goarch, + architecture = debarch, + data = select({"@io_bazel_rules_go//go/platform:" + goarch: name + "-data-" + goarch}), + homepage = KUBERNETES_HOMEPAGE, + maintainer = KUBERNETES_AUTHORS, + package = name, + tags = tags, + **kwargs + ) + +def deb_data(name, goarch = "amd64", data = [], tags = None, visibility = None): + """deb_data creates pkg_tar files for each datum.""" + deps = [] + for i, info in enumerate(data): + dname = "%s-deb-data-%s-%s" % (name, goarch, i) + deps.append(dname) + pkg_tar( + name = dname, + srcs = select({"@io_bazel_rules_go//go/platform:" + goarch: info["files"]}), + mode = info["mode"], + package_dir = info["dir"], + tags = tags, + visibility = visibility, + ) + pkg_tar( + name = name + "-data-" + goarch, + tags = tags, + visibility = visibility, + deps = select({"@io_bazel_rules_go//go/platform:" + goarch: deps}), + ) diff --git a/vendor/k8s.io/repo-infra/defs/diff_test.sh b/vendor/k8s.io/repo-infra/defs/diff_test.sh new file mode 100755 index 0000000000..437ce01882 --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/diff_test.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + +expected=$1 +generated=$2 + +diff=$(diff -u "${expected}" "${generated}" || true) + +if [[ -n "${diff}" ]]; then + echo "Generated file ${generated} does not match expected file ${expected}" + echo "${diff}" + exit 1 +fi diff --git a/vendor/k8s.io/repo-infra/defs/gcs_uploader.py b/vendor/k8s.io/repo-infra/defs/gcs_uploader.py new file mode 100644 index 0000000000..fa593fc19b --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/gcs_uploader.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python + +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import print_function +import argparse +import atexit +import os +import os.path +import shutil +import subprocess +import sys +import tempfile + +def _workspace_status_dict(root): + d = {} + for f in ("stable-status.txt", "volatile-status.txt"): + with open(os.path.join(root, f)) as info_file: + for info_line in info_file: + info_line = info_line.strip("\n") + key, value = info_line.split(" ") + d[key] = value + return d + +def main(argv): + scratch = tempfile.mkdtemp(prefix="bazel-gcs.") + atexit.register(lambda: shutil.rmtree(scratch)) + + workspace_status = _workspace_status_dict(argv.root) + with open(argv.manifest) as manifest: + for artifact in manifest: + artifact = artifact.strip("\n") + src_file, dest_dir = artifact.split("\t") + dest_dir = dest_dir.format(**workspace_status) + scratch_dest_dir = os.path.join(scratch, dest_dir) + try: + os.makedirs(scratch_dest_dir) + except (OSError): + # skip directory already exists errors + pass + + src = os.path.join(argv.root, src_file) + dest = os.path.join(scratch_dest_dir, os.path.basename(src_file)) + os.symlink(src, dest) + + ret = 0 + uploaded_paths = [] + for gcs_path in argv.gcs_paths: + gcs_path = gcs_path.format(**workspace_status) + local_path = None + if gcs_path.startswith("file://"): + local_path = gcs_path[len("file://"):] + elif "://" not in gcs_path: + local_path = gcs_path + if local_path and not os.path.exists(local_path): + os.makedirs(local_path) + + cmd = ["gsutil"] + # When rsyncing to a local directory, parallelization thrashes the disk. + # It also seems to be buggy, causing frequent "File exists" errors. + # To mitigate, only use parallel mode when rsyncing to a remote path. + if not local_path: + cmd.append("-m") + cmd.extend(["rsync", "-C", "-r", scratch, gcs_path]) + ret |= subprocess.call(cmd) + + uploaded_paths.append(gcs_path) + + print("Uploaded to %s" % " ".join(uploaded_paths)) + sys.exit(ret) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='Upload build targets to GCS.') + + parser.add_argument("--manifest", required=True, help="path to manifest of targets") + parser.add_argument("--root", required=True, help="path to root of workspace") + parser.add_argument("gcs_paths", nargs="+", help="path in gcs to push targets") + + main(parser.parse_args()) diff --git a/vendor/k8s.io/repo-infra/defs/go.bzl b/vendor/k8s.io/repo-infra/defs/go.bzl new file mode 100644 index 0000000000..8b055d7bb9 --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/go.bzl @@ -0,0 +1,124 @@ +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Rules for generating gocode at compile time.""" + +load("@bazel_skylib//lib:paths.bzl", "paths") +load("@io_bazel_rules_go//go:def.bzl", "GoArchive", "GoLibrary", "go_context", "go_rule") + +def _compute_genrule_variables(srcs, outs): + resolved_srcs = [src.path for src in srcs] + resolved_outs = [out.path for out in outs] + variables = { + "SRCS": " ".join(resolved_srcs), + "OUTS": " ".join(resolved_outs), + } + if len(resolved_srcs) == 1: + variables["<"] = resolved_srcs[0] + if len(resolved_outs) == 1: + variables["@"] = resolved_outs[0] + return variables + +def _go_genrule_impl(ctx): + go = go_context(ctx) + + transitive_libs = depset(transitive = [d[GoArchive].transitive for d in ctx.attr.go_deps]) + + gopath = [] + for lib in transitive_libs.to_list(): + for srcfile in lib.srcs: + target = ctx.actions.declare_file(paths.join( + "gopath/src", + lib.importpath, + paths.basename(srcfile.path), + )) + + args = ctx.actions.args() + args.add(srcfile.path) + args.add(target.path) + + ctx.actions.run( + executable = "mv", + arguments = [args], + inputs = [srcfile], + outputs = [target], + mnemonic = "PrepareGopath", + ) + + gopath.append(target) + + srcs = [src for srcs in ctx.attr.srcs for src in srcs.files.to_list()] + + deps = depset( + gopath + srcs, + transitive = + # tools + [dep.files for dep in ctx.attr.tools] + + # go toolchain + [depset(go.sdk.libs + go.sdk.srcs + go.sdk.tools + [go.sdk.go])], + ) + + _, cmd, _ = ctx.resolve_command( + command = ctx.attr.cmd, + attribute = "cmd", + expand_locations = True, + make_variables = _compute_genrule_variables( + srcs, + ctx.outputs.outs, + ), + tools = ctx.attr.tools, + ) + + env = dict() + env.update(ctx.configuration.default_shell_env) + env.update(go.env) + env.update({ + "PATH": ctx.configuration.host_path_separator.join(["/usr/local/bin", "/bin", "/usr/bin"]), + "GOPATH": paths.join(ctx.bin_dir.path, paths.dirname(ctx.build_file_path), "gopath"), + "GOROOT": paths.dirname(go.sdk.root_file.path), + }) + + ctx.actions.run_shell( + inputs = deps, + outputs = ctx.outputs.outs, + env = env, + command = cmd, + progress_message = "%s %s" % (ctx.attr.message, ctx), + mnemonic = "GoGenrule", + ) + +# We have codegen procedures that depend on the "go/*" stdlib packages +# and thus depend on executing with a valid GOROOT. _go_genrule handles +# dependencies on the Go toolchain and environment variables; the +# macro go_genrule handles setting up GOPATH dependencies (using go_path). +go_genrule = go_rule( + _go_genrule_impl, + attrs = { + "srcs": attr.label_list(allow_files = True), + "tools": attr.label_list( + cfg = "host", + allow_files = True, + ), + "outs": attr.output_list(mandatory = True), + "cmd": attr.string(mandatory = True), + "go_deps": attr.label_list(providers = [ + GoLibrary, + GoArchive, + ]), + "importpath": attr.string(), + "message": attr.string(), + "executable": attr.bool(default = False), + }, + output_to_genfiles = True, +) diff --git a/vendor/k8s.io/repo-infra/defs/pkg.bzl b/vendor/k8s.io/repo-infra/defs/pkg.bzl new file mode 100644 index 0000000000..ef947990cb --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/pkg.bzl @@ -0,0 +1,34 @@ +# Copyright 2017 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""A faster implementation of the pkg_tar rule. + +pkg_tar wraps the official pkg_tar rule with our faster +Go-based build_tar binary. +Additionally, the upstream pkg_tar rule defaults mode to "0555", +which prevents build_tar from automatically choosing an +appropriate mode, so we instead default it to "". +""" + +load( + "@bazel_tools//tools/build_defs/pkg:pkg.bzl", + _real_pkg_tar = "pkg_tar", +) + +def pkg_tar( + build_tar = "@io_k8s_repo_infra//tools/build_tar", + mode = "", + **kwargs): + """pkg_tar wraps the official pkg_tar rule with a faster version.""" + _real_pkg_tar(build_tar = build_tar, mode = mode, **kwargs) diff --git a/vendor/k8s.io/repo-infra/defs/rpm.bzl b/vendor/k8s.io/repo-infra/defs/rpm.bzl new file mode 100644 index 0000000000..f32e3af6a3 --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/rpm.bzl @@ -0,0 +1,44 @@ +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Rules for creating redhat packages.""" + +load("@bazel_tools//tools/build_defs/pkg:rpm.bzl", "pkg_rpm") + +GOARCH_TO_RPMARCH = { + "386": "i386", + "amd64": "x86_64", + "arm": "armhfp", + "arm64": "aarch64", + "ppc64le": "ppc64le", + "s390x": "s390x", +} + +def pkg_rpm_for_goarch(name, data, goarch, tags = None, **kwargs): + """Creates a pkg_rpm filtering to data relevant to the specified goarch.""" + rpmarch = GOARCH_TO_RPMARCH[goarch] + pkg_rpm( + name = name + "-" + goarch, + architecture = rpmarch, + data = select( + { + "@io_bazel_rules_go//go/platform:" + goarch: [ + d.format(GOARCH = goarch, RPMARCH = rpmarch) + for d in data + ], + }, + ), + tags = tags, + **kwargs + ) diff --git a/vendor/k8s.io/repo-infra/defs/run_in_workspace.bzl b/vendor/k8s.io/repo-infra/defs/run_in_workspace.bzl new file mode 100644 index 0000000000..d92c15bf5e --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/run_in_workspace.bzl @@ -0,0 +1,91 @@ +# Copyright 2018 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Defines rules for starting a process in the workspace root. + +This technique was inspired by the gazelle rule implementation in bazelbuild/rules_go: +https://github.com/bazelbuild/rules_go/blob/86ade29284ca11deeead86c061e9ba9bd0d157e0/go/private/tools/gazelle.bzl +""" + +def _workspace_binary_script_impl(ctx): + content = """#!/usr/bin/env bash +set -o errexit +set -o nounset +set -o pipefail + +if [[ -n "${{BUILD_WORKSPACE_DIRECTORY:-}}" ]]; then + # Running from inside bazel + cd "${{BUILD_WORKSPACE_DIRECTORY}}" +else + # Running from bazel-bin + cd "$(git rev-parse --show-toplevel)" +fi +# bazel-repo-infra will handle both external and local binaries, aka +# bazel-repo-infra/external/go_sdk/bin/go +# bazel-repo-infra/bazel-out/k8-fastbuild/bin/cmd/kazel/linux_amd64_stripped/kazel +"bazel-${{PWD##*/}}/{cmd}" "$@" +""".format( + cmd = ctx.file.cmd.path, + ) + ctx.actions.write( + output = ctx.outputs.executable, + content = content, + is_executable = True, + ) + runfiles = ctx.runfiles( + files = [ + ctx.file.cmd, + ], + ) + return [DefaultInfo(runfiles = runfiles)] + +_workspace_binary_script = rule( + attrs = { + "cmd": attr.label( + mandatory = True, + allow_single_file = True, + ), + }, + executable = True, + implementation = _workspace_binary_script_impl, +) + +def workspace_binary( + name, + cmd, + args = None, + visibility = None): + """Wraps a binary to be run in the workspace root via bazel run. + + For example, one might do something like + + workspace_binary( + name = "dep", + cmd = "//vendor/github.com/golang/dep/cmd/dep", + ) + which would allow running dep with bazel run. + """ + script_name = name + "_script" + _workspace_binary_script( + name = script_name, + cmd = cmd, + tags = ["manual"], + ) + native.sh_binary( + name = name, + srcs = [":" + script_name], + args = args, + visibility = visibility, + tags = ["manual"], + ) diff --git a/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt b/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt new file mode 100644 index 0000000000..ba5a5d3da4 --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt @@ -0,0 +1 @@ +This is just some data to hash diff --git a/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt.md5.expected b/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt.md5.expected new file mode 100644 index 0000000000..79c56b5a5b --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt.md5.expected @@ -0,0 +1 @@ +6c840392943ddfc0d213a8786ddcf913 diff --git a/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt.sha1.expected b/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt.sha1.expected new file mode 100644 index 0000000000..76ef2bce9e --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt.sha1.expected @@ -0,0 +1 @@ +a1ee087329ef524229a8eb3dadc33265a0d30288 diff --git a/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt.sha512.expected b/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt.sha512.expected new file mode 100644 index 0000000000..894b8a70ed --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/testdata/testfile.txt.sha512.expected @@ -0,0 +1 @@ +77f3b6ab7f0b30eac6c84baecd7308c462df575b5a1bea484253fcdf5a0f61f0d9aeaa5a25f51a1621c90d0cc461f041ba5dba7573092221287af620f0f1c573 diff --git a/vendor/k8s.io/repo-infra/defs/testgen/BUILD.bazel b/vendor/k8s.io/repo-infra/defs/testgen/BUILD.bazel new file mode 100644 index 0000000000..8b8a50f8ba --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/testgen/BUILD.bazel @@ -0,0 +1,28 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["main.go"], + importpath = "k8s.io/repo-infra/defs/testgen", + visibility = ["//defs:__subpackages__"], +) + +go_binary( + name = "testgen", + embed = [":go_default_library"], + visibility = ["//defs:__subpackages__"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/repo-infra/defs/testgen/main.go b/vendor/k8s.io/repo-infra/defs/testgen/main.go new file mode 100644 index 0000000000..b7800442ba --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/testgen/main.go @@ -0,0 +1,55 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "flag" + "fmt" + "go/ast" + "go/importer" + "go/parser" + "go/token" + "go/types" + "io/ioutil" + "log" +) + +var ( + in = flag.String("in", "", "input") + out = flag.String("out", "", "output") + pkgName = flag.String("pkg", "", "package") +) + +func main() { + flag.Parse() + + fset := token.NewFileSet() + f, err := parser.ParseFile(fset, *in, nil, 0) + if err != nil { + log.Fatal(err) + } + + conf := types.Config{Importer: importer.Default()} + + pkg, err := conf.Check(*pkgName, fset, []*ast.File{f}, nil) + if err != nil { + log.Fatal(err) + } + if err := ioutil.WriteFile(*out, []byte(fmt.Sprintf("package %s\nconst OK = true", pkg.Name())), 0666); err != nil { + log.Fatal(err) + } +} diff --git a/vendor/k8s.io/repo-infra/defs/testpkg/BUILD.bazel b/vendor/k8s.io/repo-infra/defs/testpkg/BUILD.bazel new file mode 100644 index 0000000000..ea931ae0c7 --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/testpkg/BUILD.bazel @@ -0,0 +1,38 @@ +load("//defs:go.bzl", "go_genrule") +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "ok.go", + "pkg.go", + ], + importpath = "k8s.io/repo-infra/defs/testpkg", + visibility = ["//visibility:public"], +) + +go_genrule( + name = "go_genrule_test", + srcs = [ + "pkg.go", + ], + outs = [ + "ok.go", + ], + cmd = "$(location //defs/testgen) -in=$< -out=$@ -pkg k8s.io/repo-infra/defs/testpkg", + tools = ["//defs/testgen"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/repo-infra/defs/testpkg/pkg.go b/vendor/k8s.io/repo-infra/defs/testpkg/pkg.go new file mode 100644 index 0000000000..c99b437bf9 --- /dev/null +++ b/vendor/k8s.io/repo-infra/defs/testpkg/pkg.go @@ -0,0 +1,27 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testpkg + +import ( + // Make sure stdlib is accessible + "fmt" +) + +// TestFunc is a func. +func TestFunc() { + fmt.Println("ok") +} diff --git a/vendor/k8s.io/repo-infra/go.mod b/vendor/k8s.io/repo-infra/go.mod new file mode 100644 index 0000000000..2ae3b9d630 --- /dev/null +++ b/vendor/k8s.io/repo-infra/go.mod @@ -0,0 +1,11 @@ +module k8s.io/repo-infra + +go 1.13 + +require ( + github.com/bazelbuild/bazel-gazelle v0.20.0 + github.com/bazelbuild/buildtools v0.0.0-20200228172928-c9d9e342afdb + github.com/golangci/golangci-lint v1.25.0 + golang.org/x/build v0.0.0-20200302185339-bb8466fe872a + k8s.io/klog/v2 v2.0.0 +) diff --git a/vendor/k8s.io/repo-infra/go.sum b/vendor/k8s.io/repo-infra/go.sum new file mode 100644 index 0000000000..a2cff9908d --- /dev/null +++ b/vendor/k8s.io/repo-infra/go.sum @@ -0,0 +1,575 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= +github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/bazelbuild/bazel-gazelle v0.20.0 h1:kRymV9q+24Mbeg25fJehw+gvrtVIlwZZAefOSUq4MzU= +github.com/bazelbuild/bazel-gazelle v0.20.0/go.mod h1:rPwzNHUqEzngx1iVBfO/2X2npKaT3tqPqqHW6rVsn/A= +github.com/bazelbuild/buildtools v0.0.0-20190731111112-f720930ceb60 h1:OfyUN/Msd8yqJww6deQ9vayJWw+Jrbe6Qp9giv51QQI= +github.com/bazelbuild/buildtools v0.0.0-20190731111112-f720930ceb60/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= +github.com/bazelbuild/buildtools v0.0.0-20200228172928-c9d9e342afdb h1:F2UHxHXipTXxTmIKALHwAdNsvTPhSkgshcTNCMPJj1M= +github.com/bazelbuild/buildtools v0.0.0-20200228172928-c9d9e342afdb/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= +github.com/bazelbuild/rules_go v0.0.0-20190719190356-6dae44dc5cab h1:wzbawlkLtl2ze9w/312NHZ84c7kpUCtlkD8HgFY27sw= +github.com/bazelbuild/rules_go v0.0.0-20190719190356-6dae44dc5cab/go.mod h1:MC23Dc/wkXEyk3Wpq6lCqz0ZAYOZDw2DR5y3N1q2i7M= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bombsimon/wsl/v3 v3.0.0 h1:w9f49xQatuaeTJFaNP4SpiWSR5vfT6IstPtM62JjcqA= +github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-critic/go-critic v0.4.1 h1:4DTQfT1wWwLg/hzxwD9bkdhDQrdJtxe6DUTadPlrIeE= +github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-lintpack/lintpack v0.5.2 h1:DI5mA3+eKdWeJ40nU4d6Wc26qmdG8RCi/btYq0TuRN0= +github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= +github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= +github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= +github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= +github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= +github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= +github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.0 h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA= +github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b h1:ekuhfTjngPhisSjOJ0QWKpPQE8/rbknHaes6WVJj5Hw= +github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 h1:YYWNAGTKWhKpcLLt7aSj/odlKrSrelQwlovBpDuf19w= +github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= +github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 h1:pe9JHs3cHHDQgOFXJJdYkK6fLz2PWyYtP4hthoCMvs8= +github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= +github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee h1:J2XAy40+7yz70uaOiMbNnluTg7gyQhtGqLQncQh+4J8= +github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.25.0 h1:fwVdXtCBBCmk9e/7bTjkeCMx52bhq1IqmEQOVDbHXcg= +github.com/golangci/golangci-lint v1.25.0/go.mod h1:BaJNZmLU6vdaTLEGJKTTL/05I3B2OfXaD9SrNVkwr7w= +github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI= +github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770 h1:EL/O5HGrF7Jaq0yNhBLucz9hTuRzj2LdwGBOaENgxIk= +github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 h1:leSNB7iYzLYSSx3J/s5sVf4Drkc68W2wm4Ixh/mr0us= +github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= +github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg= +github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3 h1:JVnpOZS+qxli+rgVl98ILOXVNbW+kb5wcxeGx8ShUIw= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= +github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a h1:GmsqmapfzSJkm28dhRoHz2tLRbJmqhU86IPgBtN3mmk= +github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= +github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3 h1:jNYPNLe3d8smommaoQlK7LOA5ESyUJJ+Wf79ZtA7Vp4= +github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= +github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/maratori/testpackage v1.0.1 h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ= +github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= +github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb h1:RHba4YImhrUVQDHUCe2BNSOz4tVy2yGyXhvYDvxGgeE= +github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw= +github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= +github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/ryancurrah/gomodguard v1.0.2 h1:vumZpZardqQ9EfFIZDNEpKaMxfqqEBMhu0uSRcDO5x4= +github.com/ryancurrah/gomodguard v1.0.2/go.mod h1:9T/Cfuxs5StfsocWr4WzDL36HqnX0fVb9d5fSEaLhoE= +github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83 h1:AtnWoOvTioyDXFvu96MWEeE8qj4COSQnJogzLy/u41A= +github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83/go.mod h1:vvbZ2Ae7AzSq3/kywjUDxSNq2SJ27RxCz2un0H3ePqE= +github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= +github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sourcegraph/go-diff v0.5.1 h1:gO6i5zugwzo1RVTvgvfwCOSVegNuvnNi6bAD1QCmkHs= +github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= +github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/tetafro/godot v0.2.5 h1:7+EYJM/Z4gYZhBFdRrVm6JTj5ZLw/QI1j4RfEOXJviE= +github.com/tetafro/godot v0.2.5/go.mod h1:pT6/T8+h6//L/LwQcFc4C0xpfy1euZwzS1sHdrFCms0= +github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q= +github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa h1:RC4maTWLKKwb7p1cnoygsbKIgNlJqSYBeAFON3Ar8As= +github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ultraware/funlen v0.0.2 h1:Av96YVBwwNSe4MLR7iI/BIa3VyI7/djnto/pK3Uxbdo= +github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= +github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +github.com/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs= +github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= +github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +golang.org/x/build v0.0.0-20200302185339-bb8466fe872a h1:aJVl+xDmB1VkCrLev/VX9jah/wJX/I58lUclpeX5zBY= +golang.org/x/build v0.0.0-20200302185339-bb8466fe872a/go.mod h1:AZUA4Q+VyW6vr2O+wetMY3SpcTqdCUrAcdQp3ueAxLs= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478 h1:l5EDrHhldLYb3ZRHDUhXF7Om7MvYXnkV9/iQNo1lX6g= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190122071731-054c452bb702/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190122202912-9c309ee22fab/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200102140908-9497f49d5709 h1:AfG1EmoRkFK24HWWLxSrRKNg2G+oA3JVOG8GJsHWypQ= +golang.org/x/tools v0.0.0-20200102140908-9497f49d5709/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c h1:2EA2K0k9bcvvEDlqD8xdlOhCOqq+O/p9Voqi4x9W1YU= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e h1:3Dzrrxi54Io7Aoyb0PYLsI47K2TxkRQg+cqUn+m04do= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200207204624-4f3edf09f4f6/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/klog/v2 v2.0.0 h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4= +mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 h1:JPJh2pk3+X4lXAkZIk2RuE/7/FoK9maXw+TNPJhVS/c= +sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/vendor/k8s.io/repo-infra/hack/BUILD.bazel b/vendor/k8s.io/repo-infra/hack/BUILD.bazel new file mode 100644 index 0000000000..20b8a79a66 --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/BUILD.bazel @@ -0,0 +1,166 @@ +package(default_visibility = ["//visibility:public"]) + +test_suite( + name = "verify-all", + tags = ["lint"], # picks up all non-manual targets with this tag +) + +_BUILDIFIER = "@com_github_bazelbuild_buildtools//buildifier" + +_GAZELLE = "@bazel_gazelle//cmd/gazelle" + +_GO = "@go_sdk//:bin/go" + +_KAZEL = "@io_k8s_repo_infra//cmd/kazel" + +_GOLANGCI_LINT = "@com_github_golangci_golangci_lint//cmd/golangci-lint" + +sh_binary( + name = "update-bazel", + srcs = ["update-bazel.sh"], + args = [ + "$(location %s)" % _BUILDIFIER, + "$(location %s)" % _GAZELLE, + "$(location %s)" % _KAZEL, + ], + data = [ + _BUILDIFIER, + _GAZELLE, + _KAZEL, + ], +) + +sh_binary( + name = "update-deps", + srcs = ["update-deps.sh"], + args = [ + "$(location %s)" % _GO, + "$(location :update-bazel)", + "$(location %s)" % _BUILDIFIER, + "$(location %s)" % _GAZELLE, + "$(location %s)" % _KAZEL, + ], + data = [ + _BUILDIFIER, + _GAZELLE, + _GO, + _KAZEL, + ":update-bazel", + ], +) + +sh_binary( + name = "update-gofmt", + srcs = ["update-gofmt.sh"], + args = ["$(location @go_sdk//:bin/gofmt)"], + data = ["@go_sdk//:bin/gofmt"], +) + +sh_test( + name = "verify-bazel", + srcs = ["verify-bazel.sh"], + args = [ + "$(location %s)" % _BUILDIFIER, + "$(location %s)" % _GAZELLE, + "$(location %s)" % _KAZEL, + ], + data = [ + "@//:all-srcs", + _BUILDIFIER, + _GAZELLE, + _KAZEL, + ], + tags = ["lint"], +) + +# TODO(fejta): refactor this some more +py_test( + name = "verify-boilerplate", + srcs = ["verify_boilerplate.py"], + args = ["--boilerplate-dir=$(location //verify/boilerplate:boilerplate.go.txt)"], + data = [ + "//verify/boilerplate:boilerplate.go.txt", + "//verify/boilerplate:templates", + "@//:all-srcs", + ], + main = "verify_boilerplate.py", + python_version = "PY3", + tags = ["lint"], +) + +py_test( + name = "verify_boilerplate_test", + srcs = [ + "verify_boilerplate.py", + "verify_boilerplate_test.py", + ], + data = [ + "//verify/boilerplate:templates", + "//verify/boilerplate:testdata", + ], + python_version = "PY3", +) + +sh_test( + name = "verify-deps", + srcs = ["verify-deps.sh"], + args = [ + "$(location :update-deps)", + "$(location %s)" % _GO, + "$(location :update-bazel)", + "$(location %s)" % _BUILDIFIER, + "$(location %s)" % _GAZELLE, + "$(location %s)" % _KAZEL, + ], + data = [ + _BUILDIFIER, + _GAZELLE, + _GO, + _KAZEL, + ":update-bazel", + ":update-deps", + "@//:all-srcs", + ], + tags = ["lint"], +) + +sh_test( + name = "verify-gofmt", + srcs = ["verify-gofmt.sh"], + args = ["$(location @go_sdk//:bin/gofmt)"], + data = [ + "@//:all-srcs", + "@go_sdk//:bin/gofmt", + ], + tags = ["lint"], +) + +sh_test( + name = "verify-golangci-lint", + srcs = ["verify-golangci-lint.sh"], + args = [ + "$(location %s)" % _GO, + "$(location %s)" % _GOLANGCI_LINT, + ], + data = [ + "@//:all-srcs", + _GO, + _GOLANGCI_LINT, + "@go_sdk//:files", + ], + tags = ["lint"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/repo-infra/hack/tools.go b/vendor/k8s.io/repo-infra/hack/tools.go new file mode 100644 index 0000000000..7f47f792ad --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/tools.go @@ -0,0 +1,25 @@ +// +build tools + +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hack + +import ( + _ "github.com/bazelbuild/bazel-gazelle/cmd/gazelle" + _ "github.com/bazelbuild/buildtools/buildifier" + _ "github.com/golangci/golangci-lint/cmd/golangci-lint" +) diff --git a/vendor/k8s.io/repo-infra/hack/update-bazel.sh b/vendor/k8s.io/repo-infra/hack/update-bazel.sh new file mode 100755 index 0000000000..8ad180d171 --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/update-bazel.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + +if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" ]]; then # Running inside bazel + echo "Updating bazel rules..." >&2 +elif ! command -v bazel &>/dev/null; then + echo "Install bazel at https://bazel.build" >&2 + exit 1 +else + ( + set -o xtrace + bazel run @io_k8s_repo_infra//hack:update-bazel + ) + exit 0 +fi + +buildifier=$(realpath "$1") +gazelle=$(realpath "$2") +kazel=$(realpath "$3") + +cd "$BUILD_WORKSPACE_DIRECTORY" + +if [[ ! -f go.mod ]]; then + echo "No module defined, see https://github.com/golang/go/wiki/Modules#how-to-define-a-module" >&2 + exit 1 +fi + +set -o xtrace +"$gazelle" fix --external=external +"$kazel" --cfg-path=./.kazelcfg.json +find . -name BUILD -o -name BUILD.bazel -o -name '*.bzl' -type f \ + \( -not -path '*/vendor/*' -prune \) \ + -exec "$buildifier" --mode=fix --lint=fix '{}' + diff --git a/vendor/k8s.io/repo-infra/hack/update-deps.sh b/vendor/k8s.io/repo-infra/hack/update-deps.sh new file mode 100755 index 0000000000..c1e81a6c4d --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/update-deps.sh @@ -0,0 +1,92 @@ +#!/bin/bash +# Copyright 2018 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Update vendor and bazel rules to match go.mod +# +# Usage: +# update-deps.sh [--patch|--minor] [packages] + +set -o nounset +set -o errexit +set -o pipefail + +if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" ]]; then # Running inside bazel + echo "Updating modules..." >&2 +elif ! command -v bazel &>/dev/null; then + echo "Install bazel at https://bazel.build" >&2 + exit 1 +else + ( + set -o xtrace + bazel run @io_k8s_repo_infra//hack:update-deps -- "$@" + ) + exit 0 +fi + +go=$(realpath "$1") +export PATH=$(dirname "$go"):$PATH +buildifier=$(realpath "$3") +gazelle=$(realpath "$4") +kazel=$(realpath "$5") +update_bazel=( + $(realpath "$2") + "$buildifier" + "$gazelle" + "$kazel" +) + +shift 5 + +cd "$BUILD_WORKSPACE_DIRECTORY" +trap 'echo "FAILED" >&2' ERR + +export GO111MODULE=on +export GOPROXY=https://proxy.golang.org +export GOSUMDB=sum.golang.org +mode="${1:-}" +shift || true +case "$mode" in +--minor) + if [[ -z "$@" ]]; then + "$go" get -u ./... + else + "$go" get -u "$@" + fi + ;; +--patch) + if [[ -z "$@" ]]; then + "$go" get -u=patch ./... + else + "$go" get -u=patch "$@" + fi + ;; +"") + # Just validate, or maybe manual go.mod edit + ;; +*) + echo "Usage: $(basename "$0") [--patch|--minor] [packages]" >&2 + exit 1 + ;; +esac + +rm -rf vendor +"$go" mod tidy +"$gazelle" update-repos \ + --from_file=go.mod --to_macro=repos.bzl%go_repositories \ + --build_file_generation=on --build_file_proto_mode=disable \ + --prune +"${update_bazel[@]}" # TODO(fejta): do we still need to do this? +echo "SUCCESS: updated modules" diff --git a/vendor/k8s.io/repo-infra/hack/update-gofmt.sh b/vendor/k8s.io/repo-infra/hack/update-gofmt.sh new file mode 100755 index 0000000000..78997fab34 --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/update-gofmt.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Copyright 2017 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + +if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" ]]; then # Running inside bazel + echo "Updating gofmt..." >&2 +elif ! command -v bazel &>/dev/null; then + echo "Install bazel at https://bazel.build" >&2 + exit 1 +else + ( + set -o xtrace + bazel run @io_k8s_repo_infra//hack:update-gofmt + ) + exit 0 +fi + +gofmt=$PWD/$1 +cd "$BUILD_WORKSPACE_DIRECTORY" +find . -name "*.go" \( -not -path '*/vendor/*' -prune \) -exec "$gofmt" -s -w '{}' + diff --git a/vendor/k8s.io/repo-infra/hack/verify-bazel.sh b/vendor/k8s.io/repo-infra/hack/verify-bazel.sh new file mode 100755 index 0000000000..0f999399c0 --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/verify-bazel.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + + +fail() { + echo "ERROR: $1. Fix with:" >&2 + echo " bazel run @io_k8s_repo_infra//hack:update-bazel" >&2 + exit 1 +} + +if [[ -n "${TEST_WORKSPACE:-}" ]]; then # Running inside bazel + echo "Validating bazel rules..." >&2 +elif ! command -v bazel &> /dev/null; then + echo "Install bazel at https://bazel.build" >&2 + exit 1 +elif ! bazel query @//:all-srcs &>/dev/null; then + fail "bazel rules need bootstrapping" +else + ( + set -o xtrace + bazel test --test_output=streamed @io_k8s_repo_infra//hack:verify-bazel + ) + exit 0 +fi + +buildifier=$1 +gazelle=$2 +kazel=$3 + +gazelle_diff=$("$gazelle" fix --mode=diff --external=external || echo "ERROR: gazelle diffs") +kazel_diff=$("$kazel" --dry-run --print-diff --cfg-path=./.kazelcfg.json || echo "ERROR: kazel diffs") +# TODO(fejta): --mode=diff --lint=warn +buildifier_diff=$(find . \ + -name BUILD -o -name BUILD.bazel -o -name '*.bzl' -type f \ + \( -not -path '*/vendor/*' -prune \) \ + -exec "$buildifier" --mode=diff '{}' + 2>&1 || echo "ERROR: found buildifier diffs") + +if [[ -n "${gazelle_diff}${kazel_diff}${buildifier_diff}" ]]; then + echo "Current rules (-) do not match expected (+):" >&2 + echo "gazelle diff:" + echo "${gazelle_diff}" + echo "kazel diff:" + echo "${kazel_diff}" + echo "buildifier diff:" + echo "$buildifier_diff" + echo + fail "bazel rules out of date" +fi diff --git a/vendor/k8s.io/repo-infra/hack/verify-deps.sh b/vendor/k8s.io/repo-infra/hack/verify-deps.sh new file mode 100755 index 0000000000..64f4b9cc1c --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/verify-deps.sh @@ -0,0 +1,75 @@ +#!/bin/bash +# Copyright 2018 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o nounset +set -o errexit +set -o pipefail + +fail() { + echo "ERROR: $1. Fix with:" >&2 + echo " bazel run @io_k8s_repo_infra//hack:update-deps" >&2 + exit 1 +} + + +if [[ -n "${TEST_WORKSPACE:-}" ]]; then # Running inside bazel + echo "Checking modules for changes..." >&2 +elif ! command -v bazel &>/dev/null; then + echo "Install bazel at https://bazel.build" >&2 + exit 1 +elif ! bazel query @//:all-srcs &>/dev/null; then + fail "bazel rules need bootstrapping" +else + ( + set -o xtrace + bazel test --test_output=streamed @io_k8s_repo_infra//hack:verify-deps + ) + exit 0 +fi + + +tmpfiles=$TEST_TMPDIR/files + +( + mkdir -p "$tmpfiles" + rm -f bazel-* + cp -aL "." "$tmpfiles" + export BUILD_WORKSPACE_DIRECTORY=$tmpfiles + export HOME=$(realpath "$TEST_TMPDIR/home") + unset GOPATH + go=$(realpath "$2") + export PATH=$(dirname "$go"):$PATH + "$@" +) + +( + # Remove the platform/binary for gazelle and kazel + gazelle=$(dirname "$3") + kazel=$(dirname "$4") + rm -rf {.,"$tmpfiles"}/{"$gazelle","$kazel"} +) +# Avoid diff -N so we handle empty files correctly +diff=$(diff -upr \ + -x ".git" \ + -x "bazel-*" \ + -x "_output" \ + "." "$tmpfiles" 2>/dev/null || true) + +if [[ -n "${diff}" ]]; then + echo "${diff}" >&2 + echo >&2 + fail "modules changed" +fi +echo "SUCCESS: modules up-to-date" diff --git a/vendor/k8s.io/repo-infra/hack/verify-gofmt.sh b/vendor/k8s.io/repo-infra/hack/verify-gofmt.sh new file mode 100755 index 0000000000..a15803d402 --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/verify-gofmt.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# Copyright 2017 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + +if [[ -n "${TEST_WORKSPACE:-}" ]]; then # Running inside bazel + echo "Validating gofmt..." >&2 +elif ! command -v bazel &> /dev/null; then + echo "Install bazel at https://bazel.build" >&2 + exit 1 +else + ( + set -o xtrace + bazel test --test_output=streamed @io_k8s_repo_infra//hack:verify-gofmt + ) + exit 0 +fi + +gofmt="$1" +diff=$(find . -name "*.go" \( -not -path '*/vendor/*' -prune \) -exec "$gofmt" -s -d '{}' +) +if [[ -z "$diff" ]]; then + exit 0 +fi + +echo "$diff" +echo +echo "ERROR: found unformatted go files, fix with:" >&2 +echo " bazel run @io_k8s_repo_infra//hack:update-gofmt" >&2 +exit 1 diff --git a/vendor/k8s.io/repo-infra/hack/verify-golangci-lint.sh b/vendor/k8s.io/repo-infra/hack/verify-golangci-lint.sh new file mode 100755 index 0000000000..409e56f1fb --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/verify-golangci-lint.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Copyright 2017 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + +if [[ -n "${TEST_WORKSPACE:-}" ]]; then # Running inside bazel + echo "Verifying golangci-lint..." >&2 +elif ! command -v bazel &> /dev/null; then + echo "Install bazel at https://bazel.build" >&2 + exit 1 +else + ( + set -o xtrace + bazel test --test_output=streamed @io_k8s_repo_infra//hack:verify-golangci-lint + ) + exit 0 +fi + +trap 'echo ERROR: golangci-lint failed >&2' ERR + +if [[ ! -f .golangci.yml ]]; then + echo 'ERROR: missing .golangci.yml in repo root' >&2 + exit 1 +fi + +golangci_lint=$2 +export GO111MODULE=on +export GOPROXY=https://proxy.golang.org +export GOSUMDB=sum.golang.org +export HOME=$TEST_TMPDIR/home +export GOPATH=$HOME/go +PATH=$(dirname "$1"):$PATH +export PATH +shift 2 +"$golangci_lint" run "$@" diff --git a/vendor/k8s.io/repo-infra/hack/verify_boilerplate.py b/vendor/k8s.io/repo-infra/hack/verify_boilerplate.py new file mode 100755 index 0000000000..62c584877e --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/verify_boilerplate.py @@ -0,0 +1,261 @@ +#!/usr/bin/env python3 + +# Copyright 2015 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Verifies that all source files contain the necessary copyright boilerplate +# snippet. + +import argparse +import datetime +import glob +import os +import re +import sys + + +def get_args(): + parser = argparse.ArgumentParser() + parser.add_argument( + "filenames", help="list of files to check, all files if unspecified", nargs='*') + + rootdir = os.path.abspath('.') + parser.add_argument( + "--rootdir", default=rootdir, help="root directory to examine") + + default_boilerplate_dir = os.path.join(rootdir, "verify/boilerplate") + parser.add_argument("--boilerplate-dir", default=default_boilerplate_dir) + + parser.add_argument( + '--skip', + default=[ + 'external/bazel_tools', + '.git', + 'node_modules', + '_output', + 'third_party', + 'vendor', + 'verify/boilerplate/test', + ], + action='append', + help='Customize paths to avoid', + ) + return parser.parse_args() + + +def get_refs(): + refs = {} + + template_dir = ARGS.boilerplate_dir + if not os.path.isdir(template_dir): + template_dir = os.path.dirname(template_dir) + for path in glob.glob(os.path.join(template_dir, "boilerplate.*.txt")): + extension = os.path.basename(path).split(".")[1] + + # Pass the encoding parameter to avoid ascii decode error for some + # platform. + ref_file = open(path, 'r', encoding='utf-8') + ref = ref_file.read().splitlines() + ref_file.close() + refs[extension] = ref + + return refs + + +GENERATED_GO_MARKERS = [ + "// Code generated by client-gen. DO NOT EDIT.", + "// Code generated by counterfeiter. DO NOT EDIT.", + "// Code generated by deepcopy-gen. DO NOT EDIT.", + "// Code generated by informer-gen. DO NOT EDIT.", + "// Code generated by lister-gen. DO NOT EDIT.", + "// Code generated by protoc-gen-go. DO NOT EDIT.", +] + +# given the file contents, return true if the file appears to be generated + + +def is_generated(data): + for marker in GENERATED_GO_MARKERS: + if marker in data: + return True + return False + + +def file_passes(filename, refs, regexs): # pylint: disable=too-many-locals + try: + # Pass the encoding parameter to avoid ascii decode error for some + # platform. + with open(filename, 'r', encoding='utf-8') as fp: + data = fp.read() + except IOError: + return False + + if not data: + return True # Nothing to copyright in this empty file. + + basename = os.path.basename(filename) + extension = file_extension(filename) + if extension != "": + ref = refs[extension] + else: + ref = refs[basename] + + # check for and skip generated files + if is_generated(data): + return True + + # remove build tags from the top of Go files + if extension == "go": + con = regexs["go_build_constraints"] + (data, found) = con.subn("", data, 1) + + # remove shebang from the top of shell files + if extension in ("sh", "py"): + she = regexs["shebang"] + (data, found) = she.subn("", data, 1) + + data = data.splitlines() + + # if our test file is smaller than the reference it surely fails! + if len(ref) > len(data): + return False + + # trim our file to the same number of lines as the reference file + data = data[:len(ref)] + + year = regexs["year"] + for datum in data: + if year.search(datum): + return False + + # Replace all occurrences of the regex "2017|2016|2015|2014" with "YEAR" + when = regexs["date"] + for idx, datum in enumerate(data): + (data[idx], found) = when.subn('YEAR', datum) + if found != 0: + break + + # if we don't match the reference at this point, fail + if ref != data: + return False + + return True + + +def file_extension(filename): + return os.path.splitext(filename)[1].split(".")[-1].lower() + + +# even when generated by bazel we will complain about some generated files +# not having the headers. since they're just generated, ignore them +IGNORE_HEADERS = [ + '// Code generated by go-bindata.' +] + + +def has_ignored_header(pathname): + # Pass the encoding parameter to avoid ascii decode error for some + # platform. + with open(pathname, 'r', encoding='utf-8') as myfile: + data = myfile.read() + for header in IGNORE_HEADERS: + if data.startswith(header): + return True + return False + + +def normalize_files(files): + newfiles = [] + for pathname in files: + if any(x in pathname for x in ARGS.skip): + continue + newfiles.append(pathname) + for idx, pathname in enumerate(newfiles): + if not os.path.isabs(pathname): + newfiles[idx] = os.path.join(ARGS.rootdir, pathname) + return newfiles + + +def get_files(extensions): + files = [] + if ARGS.filenames: + files = ARGS.filenames + else: + for root, dirs, walkfiles in os.walk(ARGS.rootdir): + # don't visit certain dirs. This is just a performance improvement + # as we would prune these later in normalize_files(). But doing it + # cuts down the amount of filesystem walking we do and cuts down + # the size of the file list + for dpath in ARGS.skip: + if dpath in dirs: + dirs.remove(dpath) + + for name in walkfiles: + pathname = os.path.join(root, name) + files.append(pathname) + + files = normalize_files(files) + outfiles = [] + for pathname in files: + basename = os.path.basename(pathname) + extension = file_extension(pathname) + if extension in extensions or basename in extensions: + if not has_ignored_header(pathname): + outfiles.append(pathname) + return outfiles + + +def get_dates(): + years = datetime.datetime.now().year + return '(%s)' % '|'.join((str(year) for year in range(2014, years + 1))) + + +def get_regexs(): + regexs = {} + # Search for "YEAR" which exists in the boilerplate, but shouldn't in the real thing + regexs["year"] = re.compile('YEAR') + # dates can be any year between 2014 and the current year, company holder names can be anything + regexs["date"] = re.compile(get_dates()) + # strip // +build \n\n build constraints + regexs["go_build_constraints"] = re.compile( + r"^(// \+build.*\n)+\n", re.MULTILINE) + # strip #!.* from shell/python scripts + regexs["shebang"] = re.compile(r"^(#!.*\n)\n*", re.MULTILINE) + return regexs + + +def nonconforming_lines(files): + yield '%d files have incorrect boilerplate headers:' % len(files) + for fp in files: + yield os.path.relpath(fp, ARGS.rootdir) + + +def main(): + regexs = get_regexs() + refs = get_refs() + filenames = get_files(refs.keys()) + nonconforming_files = [] + for filename in sorted(filenames): + if not file_passes(filename, refs, regexs): + nonconforming_files.append(filename) + + if nonconforming_files: + for line in nonconforming_lines(nonconforming_files): + print(line) + sys.exit(1) + + +if __name__ == "__main__": + ARGS = get_args() + main() diff --git a/vendor/k8s.io/repo-infra/hack/verify_boilerplate_test.py b/vendor/k8s.io/repo-infra/hack/verify_boilerplate_test.py new file mode 100644 index 0000000000..80cada520a --- /dev/null +++ b/vendor/k8s.io/repo-infra/hack/verify_boilerplate_test.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python + +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import io +import os +import sys +import unittest + +import verify_boilerplate + +class TestBoilerplate(unittest.TestCase): + + def setUp(self): + self.old_cwd = os.getcwd() + if os.getenv('TEST_WORKSPACE'): # Running in bazel + os.chdir('verify/boilerplate') + os.chdir('test/') + self.old_out = sys.stdout + sys.stdout = io.StringIO() + + def tearDown(self): + sys.stdout = self.old_out + os.chdir(self.old_cwd) + + def test_boilerplate(self): + + class Args(object): + def __init__(self): + self.filenames = [] + self.rootdir = '.' + self.boilerplate_dir = '../' + self.skip = [] + self.verbose = True + + verify_boilerplate.ARGS = Args() + with self.assertRaises(SystemExit): + verify_boilerplate.main() + + output = sys.stdout.getvalue() + expected = '\n'.join(verify_boilerplate.nonconforming_lines([ + './fail.go', + './fail.py', + ])) + '\n' # add trailing newline + + self.assertEquals(output, expected) + + +if __name__ == '__main__': + unittest.main() diff --git a/vendor/k8s.io/repo-infra/load.bzl b/vendor/k8s.io/repo-infra/load.bzl new file mode 100644 index 0000000000..d85bfa0a36 --- /dev/null +++ b/vendor/k8s.io/repo-infra/load.bzl @@ -0,0 +1,115 @@ +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +def repositories(): + if not native.existing_rule("subpar"): + http_archive( + name = "subpar", + urls = ["https://github.com/google/subpar/archive/2.0.0.tar.gz"], + sha256 = "b80297a1b8d38027a86836dbadc22f55dc3ecad56728175381aa6330705ac10f", + strip_prefix = "subpar-2.0.0", + ) + + # https://github.com/bazelbuild/bazel-skylib/releases + if not native.existing_rule("bazel_skylib"): + http_archive( + name = "bazel_skylib", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", + ], + sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44", + ) + + # https://github.com/bazelbuild/bazel-toolchains/releases + if not native.existing_rule("bazel_toolchains"): + http_archive( + name = "bazel_toolchains", + sha256 = "a802b753e127a6f73f3f300db5dd83fb618cd798bc880b6a87db9a8777b7939f", + strip_prefix = "bazel-toolchains-3.3.0", + urls = [ + "https://github.com/bazelbuild/bazel-toolchains/releases/download/3.3.0/bazel-toolchains-3.3.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/3.3.0.tar.gz", + ], + ) + + if not native.existing_rule("com_google_protobuf"): + http_archive( + name = "com_google_protobuf", + sha256 = "a79d19dcdf9139fa4b81206e318e33d245c4c9da1ffed21c87288ed4380426f9", + strip_prefix = "protobuf-3.11.4", + urls = [ + "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.11.4.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/v3.11.4.tar.gz", + ], + ) + + # Check https://github.com/bazelbuild/rules_go/releases for new releases + # 0.22.6 supports Golang 1.14.4 and 1.13.12 + if not native.existing_rule("io_bazel_rules_go"): + http_archive( + name = "io_bazel_rules_go", + sha256 = "e0d2e3d92ef8b3704f26ac19231ef9aba66c8a3bdec4aca91a22ad7d6e6f3ef7", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.22.6/rules_go-v0.22.6.tar.gz", + "https://github.com/bazelbuild/rules_go/releases/download/v0.22.6/rules_go-v0.22.6.tar.gz", + ], + ) + + # https://github.com/bazelbuild/bazel-gazelle#running-gazelle-with-bazel + # v0.21 needs rules_go 0.23 + if not native.existing_rule("bazel_gazelle"): + http_archive( + name = "bazel_gazelle", + #sha256 = "bfd86b3cbe855d6c16c6fce60d76bd51f5c8dbc9cfcaef7a2bb5c1aafd0710e8", + sha256 = "d8c45ee70ec39a57e7a05e5027c32b1576cc7f16d9dd37135b0eddde45cf1b10", + urls = [ + "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/v0.20.0/bazel-gazelle-v0.20.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.20.0/bazel-gazelle-v0.20.0.tar.gz", + ], + ) + + # https://github.com/bazelbuild/rules_proto#getting-started + if not native.existing_rule("rules_proto"): + http_archive( + name = "rules_proto", + sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + ], + ) + + # https://github.com/bazelbuild/buildtools/releases + # TODO(fejta): kazel needs a fix for 3.0.0 + if not native.existing_rule("com_github_bazelbuild_buildtools"): + http_archive( + name = "com_github_bazelbuild_buildtools", + sha256 = "7e9603607769f48e67dad0b04c1311484fc437a989405acc8462f3aa68e50eb0", + strip_prefix = "buildtools-2.2.1", + urls = [ + "https://github.com/bazelbuild/buildtools/archive/2.2.1.tar.gz", + ], + ) + + # https://github.com/bazelbuild/rules_nodejs/releases + if not native.existing_rule("bazel_build_rules_nodejs"): + http_archive( + name = "build_bazel_rules_nodejs", + sha256 = "d14076339deb08e5460c221fae5c5e9605d2ef4848eee1f0c81c9ffdc1ab31c1", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.6.1/rules_nodejs-1.6.1.tar.gz"], + ) diff --git a/vendor/k8s.io/repo-infra/presubmit.sh b/vendor/k8s.io/repo-infra/presubmit.sh new file mode 100755 index 0000000000..077efe2b01 --- /dev/null +++ b/vendor/k8s.io/repo-infra/presubmit.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o nounset +set -o errexit +set -o pipefail + +cd "$(git rev-parse --show-toplevel)" + +if [[ -n "${GOOGLE_APPLICATION_CREDENTIALS:-}" ]]; then + echo "Service account detected. Adding --config=ci to bazel commands" >&2 + mkdir -p "$HOME" + touch "$HOME/.bazelrc" + echo "build --config=ci" >> "$HOME/.bazelrc" +fi +( + set -o xtrace + bazel test //... # This also builds everything + ./verify/verify-boilerplate.sh --rootdir="$(pwd)" -v # TODO(fejta) migrate to bazel +) diff --git a/vendor/k8s.io/repo-infra/repos.bzl b/vendor/k8s.io/repo-infra/repos.bzl new file mode 100644 index 0000000000..5f410b489e --- /dev/null +++ b/vendor/k8s.io/repo-infra/repos.bzl @@ -0,0 +1,2004 @@ +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Configures repositories required by repo-infra.""" + +load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") +load("@bazel_skylib//lib:versions.bzl", "versions") +load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig") +load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") +load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") + +def configure(minimum_bazel_version = None, rbe_name = "rbe_default", go_version = None, nogo = None): + if minimum_bazel_version: # Allow an additional downstream constraint + versions.check(minimum_bazel_version = minimum_bazel_version) + versions.check(minimum_bazel_version = "2.2.0") # Minimum rules for this repo + if rbe_name: + rbe_autoconfig(name = rbe_name) + protobuf_deps() # No options + + go_rules_dependencies() # No options + go_register_toolchains(go_version = go_version, nogo = nogo) + + gazelle_dependencies() # TODO(fejta): go_sdk and go_repository_default_cache + +def repo_infra_go_repositories(): + go_repositories() + repo_infra_patches() + +def repo_infra_patches(): + # These require custom edits, please maintain + + go_repository( + name = "com_github_golang_protobuf", + build_file_generation = "on", + build_file_proto_mode = "disable_global", # Avoid import cyle + importpath = "github.com/golang/protobuf", + sum = "h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=", + version = "v1.3.3", + ) + go_repository( + name = "org_golang_x_tools", # Must keep in sync with rules_go version + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/tools", + patch_args = ["-p1"], + patches = [ + "@io_bazel_rules_go//third_party:org_golang_x_tools-extras.patch", # Add go_tool_library targets + ], + sum = "h1:zE128a8BUJqwFqwi8LxUnOdV3eSOGIzDhiIV/QW8eXc=", + version = "v0.0.0-20200221191710-57f3fb51f507", + ) + +def go_repositories(): + """Packages used by go.mod, created by @io_k8s_repo_infra//hack:update-bazel.""" + go_repository( + name = "cc_mvdan_interfacer", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "mvdan.cc/interfacer", + sum = "h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I=", + version = "v0.0.0-20180901003855-c20040233aed", + ) + go_repository( + name = "cc_mvdan_lint", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "mvdan.cc/lint", + sum = "h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo=", + version = "v0.0.0-20170908181259-adc824a0674b", + ) + go_repository( + name = "cc_mvdan_unparam", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "mvdan.cc/unparam", + sum = "h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4=", + version = "v0.0.0-20190720180237-d51796306d8f", + ) + go_repository( + name = "com_github_bazelbuild_bazel_gazelle", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/bazelbuild/bazel-gazelle", + sum = "h1:kRymV9q+24Mbeg25fJehw+gvrtVIlwZZAefOSUq4MzU=", + version = "v0.20.0", + ) + go_repository( + name = "com_github_bazelbuild_buildtools", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/bazelbuild/buildtools", + sum = "h1:F2UHxHXipTXxTmIKALHwAdNsvTPhSkgshcTNCMPJj1M=", + version = "v0.0.0-20200228172928-c9d9e342afdb", + ) + go_repository( + name = "com_github_burntsushi_toml", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/BurntSushi/toml", + sum = "h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=", + version = "v0.3.1", + ) + go_repository( + name = "com_github_davecgh_go_spew", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/davecgh/go-spew", + sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=", + version = "v1.1.1", + ) + go_repository( + name = "com_github_fatih_color", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/fatih/color", + sum = "h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=", + version = "v1.7.0", + ) + go_repository( + name = "com_github_fsnotify_fsnotify", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/fsnotify/fsnotify", + sum = "h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=", + version = "v1.4.7", + ) + go_repository( + name = "com_github_go_critic_go_critic", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-critic/go-critic", + sum = "h1:4DTQfT1wWwLg/hzxwD9bkdhDQrdJtxe6DUTadPlrIeE=", + version = "v0.4.1", + ) + go_repository( + name = "com_github_go_lintpack_lintpack", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-lintpack/lintpack", + sum = "h1:DI5mA3+eKdWeJ40nU4d6Wc26qmdG8RCi/btYq0TuRN0=", + version = "v0.5.2", + ) + go_repository( + name = "com_github_go_ole_go_ole", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-ole/go-ole", + sum = "h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E=", + version = "v1.2.1", + ) + go_repository( + name = "com_github_go_toolsmith_astcast", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-toolsmith/astcast", + sum = "h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_go_toolsmith_astcopy", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-toolsmith/astcopy", + sum = "h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_go_toolsmith_astequal", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-toolsmith/astequal", + sum = "h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_go_toolsmith_astfmt", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-toolsmith/astfmt", + sum = "h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_go_toolsmith_astinfo", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-toolsmith/astinfo", + sum = "h1:wP6mXeB2V/d1P1K7bZ5vDUO3YqEzcvOREOxZPEu3gVI=", + version = "v0.0.0-20180906194353-9809ff7efb21", + ) + go_repository( + name = "com_github_go_toolsmith_astp", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-toolsmith/astp", + sum = "h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_go_toolsmith_pkgload", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-toolsmith/pkgload", + sum = "h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_go_toolsmith_strparse", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-toolsmith/strparse", + sum = "h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_go_toolsmith_typep", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-toolsmith/typep", + sum = "h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_gobwas_glob", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/gobwas/glob", + sum = "h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=", + version = "v0.2.3", + ) + go_repository( + name = "com_github_gogo_protobuf", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/gogo/protobuf", + sum = "h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=", + version = "v1.2.1", + ) + go_repository( + name = "com_github_golang_mock", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golang/mock", + sum = "h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s=", + version = "v1.3.1", + ) + go_repository( + name = "com_github_golang_protobuf", + build_file_generation = "on", + build_file_proto_mode = "disable_global", # Avoid import cycle + importpath = "github.com/golang/protobuf", + sum = "h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=", + version = "v1.3.3", + ) + go_repository( + name = "com_github_golangci_check", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/check", + sum = "h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0=", + version = "v0.0.0-20180506172741-cfe4005ccda2", + ) + go_repository( + name = "com_github_golangci_dupl", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/dupl", + sum = "h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM=", + version = "v0.0.0-20180902072040-3e9179ac440a", + ) + go_repository( + name = "com_github_golangci_errcheck", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/errcheck", + sum = "h1:YYWNAGTKWhKpcLLt7aSj/odlKrSrelQwlovBpDuf19w=", + version = "v0.0.0-20181223084120-ef45e06d44b6", + ) + go_repository( + name = "com_github_golangci_go_misc", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/go-misc", + sum = "h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw=", + version = "v0.0.0-20180628070357-927a3d87b613", + ) + + go_repository( + name = "com_github_golangci_goconst", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/goconst", + sum = "h1:pe9JHs3cHHDQgOFXJJdYkK6fLz2PWyYtP4hthoCMvs8=", + version = "v0.0.0-20180610141641-041c5f2b40f3", + ) + go_repository( + name = "com_github_golangci_gocyclo", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/gocyclo", + sum = "h1:J2XAy40+7yz70uaOiMbNnluTg7gyQhtGqLQncQh+4J8=", + version = "v0.0.0-20180528134321-2becd97e67ee", + ) + go_repository( + name = "com_github_golangci_gofmt", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/gofmt", + sum = "h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks=", + version = "v0.0.0-20190930125516-244bba706f1a", + ) + go_repository( + name = "com_github_golangci_golangci_lint", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/golangci-lint", + sum = "h1:fwVdXtCBBCmk9e/7bTjkeCMx52bhq1IqmEQOVDbHXcg=", + version = "v1.25.0", + ) + + go_repository( + name = "com_github_golangci_ineffassign", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/ineffassign", + sum = "h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI=", + version = "v0.0.0-20190609212857-42439a7714cc", + ) + go_repository( + name = "com_github_golangci_lint_1", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/lint-1", + sum = "h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA=", + version = "v0.0.0-20191013205115-297bf364a8e0", + ) + go_repository( + name = "com_github_golangci_maligned", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/maligned", + sum = "h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA=", + version = "v0.0.0-20180506175553-b1d89398deca", + ) + go_repository( + name = "com_github_golangci_misspell", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/misspell", + sum = "h1:EL/O5HGrF7Jaq0yNhBLucz9hTuRzj2LdwGBOaENgxIk=", + version = "v0.0.0-20180809174111-950f5d19e770", + ) + go_repository( + name = "com_github_golangci_prealloc", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/prealloc", + sum = "h1:leSNB7iYzLYSSx3J/s5sVf4Drkc68W2wm4Ixh/mr0us=", + version = "v0.0.0-20180630174525-215b22d4de21", + ) + go_repository( + name = "com_github_golangci_revgrep", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/revgrep", + sum = "h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg=", + version = "v0.0.0-20180526074752-d9c87f5ffaf0", + ) + go_repository( + name = "com_github_golangci_unconvert", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golangci/unconvert", + sum = "h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys=", + version = "v0.0.0-20180507085042-28b1c447d1f4", + ) + go_repository( + name = "com_github_google_go_cmp", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/google/go-cmp", + sum = "h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=", + version = "v0.4.0", + ) + go_repository( + name = "com_github_gostaticanalysis_analysisutil", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/gostaticanalysis/analysisutil", + sum = "h1:JVnpOZS+qxli+rgVl98ILOXVNbW+kb5wcxeGx8ShUIw=", + version = "v0.0.0-20190318220348-4088753ea4d3", + ) + go_repository( + name = "com_github_hashicorp_hcl", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/hashicorp/hcl", + sum = "h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hpcloud_tail", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/hpcloud/tail", + sum = "h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_inconshreveable_mousetrap", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/inconshreveable/mousetrap", + sum = "h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_kisielk_gotool", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/kisielk/gotool", + sum = "h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_klauspost_compress", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/klauspost/compress", + sum = "h1:8VMb5+0wMgdBykOV96DwNwKFQ+WTI4pzYURP99CcB9E=", + version = "v1.4.1", + ) + go_repository( + name = "com_github_klauspost_cpuid", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/klauspost/cpuid", + sum = "h1:NMpwD2G9JSFOE1/TJjGSo5zG7Yb2bTe7eq1jH+irmeE=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_kr_pretty", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/kr/pretty", + sum = "h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=", + version = "v0.1.0", + ) + go_repository( + name = "com_github_kr_pty", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/kr/pty", + sum = "h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=", + version = "v1.1.8", + ) + go_repository( + name = "com_github_kr_text", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/kr/text", + sum = "h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=", + version = "v0.2.0", + ) + go_repository( + name = "com_github_logrusorgru_aurora", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/logrusorgru/aurora", + sum = "h1:9MlwzLdW7QSDrhDjFlsEYmxpFyIoXmYRon3dt0io31k=", + version = "v0.0.0-20181002194514-a7b3b318ed4e", + ) + go_repository( + name = "com_github_magiconair_properties", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/magiconair/properties", + sum = "h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=", + version = "v1.8.1", + ) + go_repository( + name = "com_github_mattn_go_colorable", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/mattn/go-colorable", + sum = "h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=", + version = "v0.1.4", + ) + go_repository( + name = "com_github_mattn_go_isatty", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/mattn/go-isatty", + sum = "h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=", + version = "v0.0.8", + ) + go_repository( + name = "com_github_mattn_goveralls", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/mattn/goveralls", + sum = "h1:7eJB6EqsPhRVxvwEXGnqdO2sJI0PTsrWoTMXEk9/OQc=", + version = "v0.0.2", + ) + go_repository( + name = "com_github_mitchellh_go_homedir", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/mitchellh/go-homedir", + sum = "h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=", + version = "v1.1.0", + ) + go_repository( + name = "com_github_mitchellh_go_ps", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/mitchellh/go-ps", + sum = "h1:9+ke9YJ9KGWw5ANXK6ozjoK47uI3uNbXv4YVINBnGm8=", + version = "v0.0.0-20190716172923-621e5597135b", + ) + go_repository( + name = "com_github_mitchellh_mapstructure", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/mitchellh/mapstructure", + sum = "h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=", + version = "v1.1.2", + ) + go_repository( + name = "com_github_mozilla_tls_observatory", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/mozilla/tls-observatory", + sum = "h1:Av0AX0PnAlPZ3AY2rQUobGFaZfE4KHVRdKWIEPvsCWY=", + version = "v0.0.0-20190404164649-a3c1b6cfecfd", + ) + go_repository( + name = "com_github_nbutton23_zxcvbn_go", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/nbutton23/zxcvbn-go", + sum = "h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E=", + version = "v0.0.0-20180912185939-ae427f1e4c1d", + ) + go_repository( + name = "com_github_onsi_ginkgo", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/onsi/ginkgo", + sum = "h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=", + version = "v1.11.0", + ) + go_repository( + name = "com_github_onsi_gomega", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/onsi/gomega", + sum = "h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34=", + version = "v1.8.1", + ) + go_repository( + name = "com_github_openpeedeep_depguard", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/OpenPeeDeeP/depguard", + sum = "h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us=", + version = "v1.0.1", + ) + go_repository( + name = "com_github_pelletier_go_toml", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/pelletier/go-toml", + sum = "h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_pkg_errors", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/pkg/errors", + sum = "h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=", + version = "v0.8.1", + ) + go_repository( + name = "com_github_pmezard_go_difflib", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/pmezard/go-difflib", + sum = "h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_quasilyte_go_consistent", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/quasilyte/go-consistent", + sum = "h1:JoUA0uz9U0FVFq5p4LjEq4C0VgQ0El320s3Ms0V4eww=", + version = "v0.0.0-20190521200055-c6f3937de18c", + ) + go_repository( + name = "com_github_rogpeppe_go_internal", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/rogpeppe/go-internal", + sum = "h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk=", + version = "v1.3.0", + ) + + go_repository( + name = "com_github_shirou_gopsutil", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/shirou/gopsutil", + sum = "h1:WokF3GuxBeL+n4Lk4Fa8v9mbdjlrl7bHuneF4N1bk2I=", + version = "v0.0.0-20190901111213-e4ec7b275ada", + ) + go_repository( + name = "com_github_shirou_w32", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/shirou/w32", + sum = "h1:udFKJ0aHUL60LboW/A+DfgoHVedieIzIXE8uylPue0U=", + version = "v0.0.0-20160930032740-bb4de0191aa4", + ) + go_repository( + name = "com_github_shurcool_go", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/shurcooL/go", + sum = "h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM=", + version = "v0.0.0-20180423040247-9e1955d9fb6e", + ) + go_repository( + name = "com_github_shurcool_go_goon", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/shurcooL/go-goon", + sum = "h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc=", + version = "v0.0.0-20170922171312-37c2f522c041", + ) + go_repository( + name = "com_github_sirupsen_logrus", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/sirupsen/logrus", + sum = "h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=", + version = "v1.4.2", + ) + go_repository( + name = "com_github_sourcegraph_go_diff", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/sourcegraph/go-diff", + sum = "h1:gO6i5zugwzo1RVTvgvfwCOSVegNuvnNi6bAD1QCmkHs=", + version = "v0.5.1", + ) + go_repository( + name = "com_github_spf13_afero", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/spf13/afero", + sum = "h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=", + version = "v1.1.2", + ) + go_repository( + name = "com_github_spf13_cast", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/spf13/cast", + sum = "h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=", + version = "v1.3.0", + ) + go_repository( + name = "com_github_spf13_cobra", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/spf13/cobra", + sum = "h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s=", + version = "v0.0.5", + ) + go_repository( + name = "com_github_spf13_jwalterweatherman", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/spf13/jwalterweatherman", + sum = "h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_spf13_pflag", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/spf13/pflag", + sum = "h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=", + version = "v1.0.5", + ) + go_repository( + name = "com_github_spf13_viper", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/spf13/viper", + sum = "h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk=", + version = "v1.6.1", + ) + go_repository( + name = "com_github_stackexchange_wmi", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/StackExchange/wmi", + sum = "h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8=", + version = "v0.0.0-20180116203802-5d049714c4a6", + ) + go_repository( + name = "com_github_stretchr_testify", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/stretchr/testify", + sum = "h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=", + version = "v1.5.1", + ) + go_repository( + name = "com_github_timakin_bodyclose", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/timakin/bodyclose", + sum = "h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q=", + version = "v0.0.0-20190930140734-f7f2e9bca95e", + ) + go_repository( + name = "com_github_ultraware_funlen", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/ultraware/funlen", + sum = "h1:Av96YVBwwNSe4MLR7iI/BIa3VyI7/djnto/pK3Uxbdo=", + version = "v0.0.2", + ) + go_repository( + name = "com_github_valyala_bytebufferpool", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/valyala/bytebufferpool", + sum = "h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_valyala_fasthttp", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/valyala/fasthttp", + sum = "h1:dzZJf2IuMiclVjdw0kkT+f9u4YdrapbNyGAN47E/qnk=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_valyala_quicktemplate", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/valyala/quicktemplate", + sum = "h1:BaO1nHTkspYzmAjPXj0QiDJxai96tlcZyKcI9dyEGvM=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_valyala_tcplisten", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/valyala/tcplisten", + sum = "h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc=", + version = "v0.0.0-20161114210144-ceec8f93295a", + ) + go_repository( + name = "com_sourcegraph_sqs_pbtypes", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "sourcegraph.com/sqs/pbtypes", + sum = "h1:JPJh2pk3+X4lXAkZIk2RuE/7/FoK9maXw+TNPJhVS/c=", + version = "v0.0.0-20180604144634-d3ebe8f20ae4", + ) + + go_repository( + name = "in_gopkg_check_v1", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "gopkg.in/check.v1", + sum = "h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=", + version = "v1.0.0-20200227125254-8fa46927fb4f", + ) + go_repository( + name = "in_gopkg_errgo_v2", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "gopkg.in/errgo.v2", + sum = "h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=", + version = "v2.1.0", + ) + go_repository( + name = "in_gopkg_fsnotify_v1", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "gopkg.in/fsnotify.v1", + sum = "h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=", + version = "v1.4.7", + ) + + go_repository( + name = "in_gopkg_tomb_v1", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "gopkg.in/tomb.v1", + sum = "h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=", + version = "v1.0.0-20141024135613-dd632973f1e7", + ) + go_repository( + name = "in_gopkg_yaml_v2", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "gopkg.in/yaml.v2", + sum = "h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=", + version = "v2.2.8", + ) + go_repository( + name = "io_k8s_klog_v2", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "k8s.io/klog/v2", + sum = "h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok=", + version = "v2.0.0", + ) + go_repository( + name = "org_golang_x_build", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/build", + sum = "h1:aJVl+xDmB1VkCrLev/VX9jah/wJX/I58lUclpeX5zBY=", + version = "v0.0.0-20200302185339-bb8466fe872a", + ) + go_repository( + name = "org_golang_x_crypto", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/crypto", + sum = "h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=", + version = "v0.0.0-20191011191535-87dc89f01550", + ) + go_repository( + name = "org_golang_x_net", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/net", + sum = "h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=", + version = "v0.0.0-20200226121028-0de0cce0169b", + ) + go_repository( + name = "org_golang_x_sync", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/sync", + sum = "h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=", + version = "v0.0.0-20190911185100-cd5d95a43a6e", + ) + go_repository( + name = "org_golang_x_sys", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/sys", + sum = "h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0=", + version = "v0.0.0-20200202164722-d101bd2416d5", + ) + go_repository( + name = "org_golang_x_text", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/text", + sum = "h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=", + version = "v0.3.2", + ) + go_repository( + name = "org_golang_x_tools", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/tools", + patch_args = ["-p1"], + patches = [ + "@io_bazel_rules_go//third_party:org_golang_x_tools-extras.patch", # Add go_tool_library targets + ], + sum = "h1:3Dzrrxi54Io7Aoyb0PYLsI47K2TxkRQg+cqUn+m04do=", + version = "v0.0.0-20200422022333-3d57cf2e726e", + ) + go_repository( + name = "org_golang_x_xerrors", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/xerrors", + sum = "h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=", + version = "v0.0.0-20191204190536-9bdfabe68543", + ) + go_repository( + name = "com_github_armon_consul_api", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/armon/consul-api", + sum = "h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA=", + version = "v0.0.0-20180202201655-eb2c6b5be1b6", + ) + go_repository( + name = "com_github_bazelbuild_rules_go", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/bazelbuild/rules_go", + sum = "h1:wzbawlkLtl2ze9w/312NHZ84c7kpUCtlkD8HgFY27sw=", + version = "v0.0.0-20190719190356-6dae44dc5cab", + ) + go_repository( + name = "com_github_coreos_etcd", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/coreos/etcd", + sum = "h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=", + version = "v3.3.10+incompatible", + ) + go_repository( + name = "com_github_coreos_go_etcd", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/coreos/go-etcd", + sum = "h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo=", + version = "v2.0.0+incompatible", + ) + go_repository( + name = "com_github_coreos_go_semver", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/coreos/go-semver", + sum = "h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=", + version = "v0.2.0", + ) + go_repository( + name = "com_github_cpuguy83_go_md2man", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/cpuguy83/go-md2man", + sum = "h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=", + version = "v1.0.10", + ) + go_repository( + name = "com_github_russross_blackfriday", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/russross/blackfriday", + sum = "h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=", + version = "v1.5.2", + ) + go_repository( + name = "com_github_ugorji_go_codec", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/ugorji/go/codec", + sum = "h1:3SVOIvH7Ae1KRYyQWRjXWJEA9sS/c/pjvH++55Gr648=", + version = "v0.0.0-20181204163529-d75b2dcb6bc8", + ) + go_repository( + name = "com_github_xordataexchange_crypt", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/xordataexchange/crypt", + sum = "h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow=", + version = "v0.0.3-0.20170626215501-b2862e3d0a77", + ) + go_repository( + name = "com_github_go_logr_logr", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-logr/logr", + sum = "h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg=", + version = "v0.1.0", + ) + go_repository( + name = "co_honnef_go_tools", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "honnef.co/go/tools", + sum = "h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=", + version = "v0.0.1-2019.2.3", + ) + go_repository( + name = "com_github_anmitsu_go_shlex", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/anmitsu/go-shlex", + sum = "h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=", + version = "v0.0.0-20161002113705-648efa622239", + ) + go_repository( + name = "com_github_bradfitz_go_smtpd", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/bradfitz/go-smtpd", + sum = "h1:ckJgFhFWywOx+YLEMIJsTb+NV6NexWICk5+AMSuz3ss=", + version = "v0.0.0-20170404230938-deb6d6237625", + ) + go_repository( + name = "com_github_client9_misspell", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/client9/misspell", + sum = "h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=", + version = "v0.3.4", + ) + go_repository( + name = "com_github_coreos_go_systemd", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/coreos/go-systemd", + sum = "h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=", + version = "v0.0.0-20190321100706-95778dfbb74e", + ) + go_repository( + name = "com_github_flynn_go_shlex", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/flynn/go-shlex", + sum = "h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=", + version = "v0.0.0-20150515145356-3f9db97f8568", + ) + go_repository( + name = "com_github_gliderlabs_ssh", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/gliderlabs/ssh", + sum = "h1:j3L6gSLQalDETeEg/Jg0mGY0/y/N6zI2xX1978P0Uqw=", + version = "v0.1.1", + ) + go_repository( + name = "com_github_golang_glog", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golang/glog", + sum = "h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=", + version = "v0.0.0-20160126235308-23def4e6c14b", + ) + go_repository( + name = "com_github_google_btree", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/google/btree", + sum = "h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_google_go_github", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/google/go-github", + sum = "h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=", + version = "v17.0.0+incompatible", + ) + go_repository( + name = "com_github_google_go_querystring", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/google/go-querystring", + sum = "h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_google_martian", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/google/martian", + sum = "h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=", + version = "v2.1.0+incompatible", + ) + go_repository( + name = "com_github_google_pprof", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/google/pprof", + sum = "h1:DLpL8pWq0v4JYoRpEhDfsJhhJyGKCcQM2WPW2TJs31c=", + version = "v0.0.0-20191218002539-d4f498aebedc", + ) + go_repository( + name = "com_github_googleapis_gax_go_v2", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/googleapis/gax-go/v2", + sum = "h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=", + version = "v2.0.5", + ) + go_repository( + name = "com_github_gregjones_httpcache", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/gregjones/httpcache", + sum = "h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM=", + version = "v0.0.0-20180305231024-9cad4c3443a7", + ) + go_repository( + name = "com_github_hashicorp_golang_lru", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/hashicorp/golang-lru", + sum = "h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=", + version = "v0.5.1", + ) + go_repository( + name = "com_github_jellevandenhooff_dkim", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/jellevandenhooff/dkim", + sum = "h1:ujPKutqRlJtcfWk6toYVYagwra7HQHbXOaS171b4Tg8=", + version = "v0.0.0-20150330215556-f50fe3d243e1", + ) + go_repository( + name = "com_github_jstemmer_go_junit_report", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/jstemmer/go-junit-report", + sum = "h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o=", + version = "v0.9.1", + ) + go_repository( + name = "com_github_tarm_serial", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/tarm/serial", + sum = "h1:UyzmZLoiDWMRywV4DUYb9Fbt8uiOSooupjTq10vpvnU=", + version = "v0.0.0-20180830185346-98f6abe2eb07", + ) + go_repository( + name = "com_google_cloud_go", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "cloud.google.com/go", + sum = "h1:GGslhk/BU052LPlnI1vpp3fcbUs+hQ3E+Doti/3/vF8=", + version = "v0.52.0", + ) + go_repository( + name = "in_gopkg_inf_v0", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "gopkg.in/inf.v0", + sum = "h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=", + version = "v0.9.1", + ) + go_repository( + name = "io_opencensus_go", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "go.opencensus.io", + sum = "h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs=", + version = "v0.22.2", + ) + go_repository( + name = "org_go4", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "go4.org", + sum = "h1:+hE86LblG4AyDgwMCLTE6FOlM9+qjHSYS+rKqxUVdsM=", + version = "v0.0.0-20180809161055-417644f6feb5", + ) + go_repository( + name = "org_go4_grpc", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "grpc.go4.org", + sum = "h1:tmXTu+dfa+d9Evp8NpJdgOy6+rt8/x4yG7qPBrtNfLY=", + version = "v0.0.0-20170609214715-11d0a25b4919", + ) + go_repository( + name = "org_golang_google_api", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "google.golang.org/api", + sum = "h1:0q95w+VuFtv4PAx4PZVQdBMmYbaCHbnfKaEiDIcVyag=", + version = "v0.17.0", + ) + go_repository( + name = "org_golang_google_appengine", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "google.golang.org/appengine", + sum = "h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM=", + version = "v1.6.5", + ) + go_repository( + name = "org_golang_google_genproto", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "google.golang.org/genproto", + sum = "h1:tirixpud1WdjE3/NrL9ar4ot0ADfwls8sOcIf1ivRDw=", + version = "v0.0.0-20200207204624-4f3edf09f4f6", + ) + go_repository( + name = "org_golang_google_grpc", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "google.golang.org/grpc", + sum = "h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk=", + version = "v1.27.1", + ) + go_repository( + name = "org_golang_x_exp", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/exp", + sum = "h1:zQpM52jfKHG6II1ISZY1ZcpygvuSFZpLwfluuF89XOg=", + version = "v0.0.0-20191227195350-da58074b4299", + ) + go_repository( + name = "org_golang_x_lint", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/lint", + sum = "h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE=", + version = "v0.0.0-20191125180803-fdd1cda4f05f", + ) + go_repository( + name = "org_golang_x_oauth2", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/oauth2", + sum = "h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw=", + version = "v0.0.0-20200107190931-bf48bf16ab8d", + ) + go_repository( + name = "org_golang_x_perf", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/perf", + sum = "h1:xYq6+9AtI+xP3M4r0N1hCkHrInHDBohhquRgx9Kk6gI=", + version = "v0.0.0-20180704124530-6e6d33e29852", + ) + go_repository( + name = "org_golang_x_time", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/time", + sum = "h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=", + version = "v0.0.0-20190308202827-9d24e82272b4", + ) + go_repository( + name = "com_github_alecthomas_template", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/alecthomas/template", + sum = "h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU=", + version = "v0.0.0-20160405071501-a0175ee3bccc", + ) + go_repository( + name = "com_github_alecthomas_units", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/alecthomas/units", + sum = "h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=", + version = "v0.0.0-20151022065526-2efee857e7cf", + ) + go_repository( + name = "com_github_beorn7_perks", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/beorn7/perks", + sum = "h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=", + version = "v1.0.0", + ) + + go_repository( + name = "com_github_cespare_xxhash", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/cespare/xxhash", + sum = "h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=", + version = "v1.1.0", + ) + go_repository( + name = "com_github_coreos_bbolt", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/coreos/bbolt", + sum = "h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s=", + version = "v1.3.2", + ) + go_repository( + name = "com_github_coreos_pkg", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/coreos/pkg", + sum = "h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=", + version = "v0.0.0-20180928190104-399ea9e2e55f", + ) + go_repository( + name = "com_github_creack_pty", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/creack/pty", + sum = "h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=", + version = "v1.1.9", + ) + go_repository( + name = "com_github_dgrijalva_jwt_go", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/dgrijalva/jwt-go", + sum = "h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=", + version = "v3.2.0+incompatible", + ) + go_repository( + name = "com_github_dgryski_go_sip13", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/dgryski/go-sip13", + sum = "h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4=", + version = "v0.0.0-20181026042036-e10d5fee7954", + ) + go_repository( + name = "com_github_ghodss_yaml", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/ghodss/yaml", + sum = "h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_go_kit_kit", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-kit/kit", + sum = "h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0=", + version = "v0.8.0", + ) + go_repository( + name = "com_github_go_logfmt_logfmt", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-logfmt/logfmt", + sum = "h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA=", + version = "v0.4.0", + ) + go_repository( + name = "com_github_go_stack_stack", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-stack/stack", + sum = "h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=", + version = "v1.8.0", + ) + go_repository( + name = "com_github_gofrs_flock", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/gofrs/flock", + sum = "h1:ekuhfTjngPhisSjOJ0QWKpPQE8/rbknHaes6WVJj5Hw=", + version = "v0.0.0-20190320160742-5135e617513b", + ) + go_repository( + name = "com_github_golang_groupcache", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/golang/groupcache", + sum = "h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA=", + version = "v0.0.0-20191227052852-215e87163ea7", + ) + go_repository( + name = "com_github_google_renameio", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/google/renameio", + sum = "h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA=", + version = "v0.1.0", + ) + go_repository( + name = "com_github_gorilla_websocket", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/gorilla/websocket", + sum = "h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=", + version = "v1.4.0", + ) + go_repository( + name = "com_github_grpc_ecosystem_go_grpc_middleware", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/grpc-ecosystem/go-grpc-middleware", + sum = "h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_grpc_ecosystem_go_grpc_prometheus", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/grpc-ecosystem/go-grpc-prometheus", + sum = "h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_grpc_ecosystem_grpc_gateway", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/grpc-ecosystem/grpc-gateway", + sum = "h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI=", + version = "v1.9.0", + ) + go_repository( + name = "com_github_jonboulle_clockwork", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/jonboulle/clockwork", + sum = "h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=", + version = "v0.1.0", + ) + go_repository( + name = "com_github_julienschmidt_httprouter", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/julienschmidt/httprouter", + sum = "h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_kisielk_errcheck", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/kisielk/errcheck", + sum = "h1:ZqfnKyx9KGpRcW04j5nnPDgRgoXUeLh2YFBeFzphcA0=", + version = "v1.1.0", + ) + go_repository( + name = "com_github_konsorten_go_windows_terminal_sequences", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/konsorten/go-windows-terminal-sequences", + sum = "h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=", + version = "v1.0.1", + ) + go_repository( + name = "com_github_kr_logfmt", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/kr/logfmt", + sum = "h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=", + version = "v0.0.0-20140226030751-b84e30acd515", + ) + go_repository( + name = "com_github_lib_pq", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/lib/pq", + sum = "h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_matoous_godox", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/matoous/godox", + sum = "h1:RHba4YImhrUVQDHUCe2BNSOz4tVy2yGyXhvYDvxGgeE=", + version = "v0.0.0-20190911065817-5d6d842e92eb", + ) + go_repository( + name = "com_github_matttproud_golang_protobuf_extensions", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/matttproud/golang_protobuf_extensions", + sum = "h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=", + version = "v1.0.1", + ) + go_repository( + name = "com_github_mwitkow_go_conntrack", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/mwitkow/go-conntrack", + sum = "h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc=", + version = "v0.0.0-20161129095857-cc309e4a2223", + ) + go_repository( + name = "com_github_oklog_ulid", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/oklog/ulid", + sum = "h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=", + version = "v1.3.1", + ) + go_repository( + name = "com_github_oneofone_xxhash", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/OneOfOne/xxhash", + sum = "h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=", + version = "v1.2.2", + ) + go_repository( + name = "com_github_prometheus_client_golang", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/prometheus/client_golang", + sum = "h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8=", + version = "v0.9.3", + ) + go_repository( + name = "com_github_prometheus_client_model", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/prometheus/client_model", + sum = "h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=", + version = "v0.0.0-20190812154241-14fe0d1b01d4", + ) + go_repository( + name = "com_github_prometheus_common", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/prometheus/common", + sum = "h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM=", + version = "v0.4.0", + ) + go_repository( + name = "com_github_prometheus_procfs", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/prometheus/procfs", + sum = "h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY=", + version = "v0.0.0-20190507164030-5867b95ac084", + ) + go_repository( + name = "com_github_prometheus_tsdb", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/prometheus/tsdb", + sum = "h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=", + version = "v0.7.1", + ) + go_repository( + name = "com_github_rogpeppe_fastuuid", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/rogpeppe/fastuuid", + sum = "h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng=", + version = "v0.0.0-20150106093220-6724a57986af", + ) + go_repository( + name = "com_github_securego_gosec", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/securego/gosec", + sum = "h1:AtnWoOvTioyDXFvu96MWEeE8qj4COSQnJogzLy/u41A=", + version = "v0.0.0-20200103095621-79fbf3af8d83", + ) + go_repository( + name = "com_github_soheilhy_cmux", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/soheilhy/cmux", + sum = "h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=", + version = "v0.1.4", + ) + go_repository( + name = "com_github_spaolacci_murmur3", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/spaolacci/murmur3", + sum = "h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=", + version = "v0.0.0-20180118202830-f09979ecbc72", + ) + go_repository( + name = "com_github_stretchr_objx", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/stretchr/objx", + sum = "h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=", + version = "v0.2.0", + ) + go_repository( + name = "com_github_tmc_grpc_websocket_proxy", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/tmc/grpc-websocket-proxy", + sum = "h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=", + version = "v0.0.0-20190109142713-0ad062ec5ee5", + ) + go_repository( + name = "com_github_ugorji_go", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/ugorji/go", + sum = "h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw=", + version = "v1.1.4", + ) + go_repository( + name = "com_github_ultraware_whitespace", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/ultraware/whitespace", + sum = "h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg=", + version = "v0.0.4", + ) + go_repository( + name = "com_github_uudashr_gocognit", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/uudashr/gocognit", + sum = "h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs=", + version = "v1.0.1", + ) + go_repository( + name = "com_github_xiang90_probing", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/xiang90/probing", + sum = "h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=", + version = "v0.0.0-20190116061207-43a291ad63a2", + ) + go_repository( + name = "in_gopkg_alecthomas_kingpin_v2", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "gopkg.in/alecthomas/kingpin.v2", + sum = "h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=", + version = "v2.2.6", + ) + go_repository( + name = "in_gopkg_resty_v1", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "gopkg.in/resty.v1", + sum = "h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=", + version = "v1.12.0", + ) + go_repository( + name = "io_etcd_go_bbolt", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "go.etcd.io/bbolt", + sum = "h1:Z/90sZLPOeCy2PwprqkFa25PdkusRzaj9P8zm/KNyvk=", + version = "v1.3.2", + ) + go_repository( + name = "org_golang_x_mod", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/mod", + sum = "h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=", + version = "v0.2.0", + ) + go_repository( + name = "org_uber_go_atomic", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "go.uber.org/atomic", + sum = "h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=", + version = "v1.4.0", + ) + go_repository( + name = "org_uber_go_multierr", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "go.uber.org/multierr", + sum = "h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=", + version = "v1.1.0", + ) + go_repository( + name = "org_uber_go_zap", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "go.uber.org/zap", + sum = "h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM=", + version = "v1.10.0", + ) + + go_repository( + name = "com_github_google_uuid", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/google/uuid", + sum = "h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_gopherjs_gopherjs", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/gopherjs/gopherjs", + sum = "h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=", + version = "v0.0.0-20181017120253-0766667cb4d1", + ) + go_repository( + name = "com_github_jtolds_gls", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/jtolds/gls", + sum = "h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=", + version = "v4.20.0+incompatible", + ) + go_repository( + name = "com_github_pborman_uuid", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/pborman/uuid", + sum = "h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_smartystreets_assertions", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/smartystreets/assertions", + sum = "h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=", + version = "v0.0.0-20180927180507-b2de0cb4f26d", + ) + go_repository( + name = "com_github_smartystreets_goconvey", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/smartystreets/goconvey", + sum = "h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=", + version = "v1.6.4", + ) + go_repository( + name = "com_github_subosito_gotenv", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/subosito/gotenv", + sum = "h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_tommy_muehle_go_mnd", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/tommy-muehle/go-mnd", + sum = "h1:RC4maTWLKKwb7p1cnoygsbKIgNlJqSYBeAFON3Ar8As=", + version = "v1.3.1-0.20200224220436-e6f9a994e8fa", + ) + go_repository( + name = "in_gopkg_ini_v1", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "gopkg.in/ini.v1", + sum = "h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=", + version = "v1.51.0", + ) + go_repository( + name = "com_github_go_sql_driver_mysql", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-sql-driver/mysql", + sum = "h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk=", + version = "v1.4.0", + ) + go_repository( + name = "com_github_jingyugao_rowserrcheck", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/jingyugao/rowserrcheck", + sum = "h1:GmsqmapfzSJkm28dhRoHz2tLRbJmqhU86IPgBtN3mmk=", + version = "v0.0.0-20191204022205-72ab7603b68a", + ) + go_repository( + name = "com_github_jirfag_go_printf_func_name", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/jirfag/go-printf-func-name", + sum = "h1:jNYPNLe3d8smommaoQlK7LOA5ESyUJJ+Wf79ZtA7Vp4=", + version = "v0.0.0-20191110105641-45db9963cdd3", + ) + go_repository( + name = "com_github_jmoiron_sqlx", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/jmoiron/sqlx", + sum = "h1:lrdPtrORjGv1HbbEvKWDUAy97mPpFm4B8hp77tcCUJY=", + version = "v1.2.1-0.20190826204134-d7d95172beb5", + ) + go_repository( + name = "com_github_mattn_go_sqlite3", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/mattn/go-sqlite3", + sum = "h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4=", + version = "v1.9.0", + ) + go_repository( + name = "com_github_burntsushi_xgb", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/BurntSushi/xgb", + sum = "h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=", + version = "v0.0.0-20160522181843-27f122750802", + ) + go_repository( + name = "com_github_census_instrumentation_opencensus_proto", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/census-instrumentation/opencensus-proto", + sum = "h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=", + version = "v0.2.1", + ) + go_repository( + name = "com_github_chzyer_logex", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/chzyer/logex", + sum = "h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=", + version = "v1.1.10", + ) + go_repository( + name = "com_github_chzyer_readline", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/chzyer/readline", + sum = "h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=", + version = "v0.0.0-20180603132655-2972be24d48e", + ) + go_repository( + name = "com_github_chzyer_test", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/chzyer/test", + sum = "h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8=", + version = "v0.0.0-20180213035817-a1ea475d72b1", + ) + go_repository( + name = "com_github_envoyproxy_go_control_plane", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/envoyproxy/go-control-plane", + sum = "h1:4cmBvAEBNJaGARUEs3/suWRyfyBfhf7I60WBZq+bv2w=", + version = "v0.9.1-0.20191026205805-5f8ba28d4473", + ) + go_repository( + name = "com_github_envoyproxy_protoc_gen_validate", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/envoyproxy/protoc-gen-validate", + sum = "h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A=", + version = "v0.1.0", + ) + go_repository( + name = "com_github_go_gl_glfw_v3_3_glfw", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-gl/glfw/v3.3/glfw", + sum = "h1:b+9H1GAsx5RsjvDFLoS5zkNBzIQMuVKUYQDmxU3N5XE=", + version = "v0.0.0-20191125211704-12ad95a8df72", + ) + go_repository( + name = "com_github_ianlancetaylor_demangle", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/ianlancetaylor/demangle", + sum = "h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c=", + version = "v0.0.0-20181102032728-5e5cf60278f6", + ) + go_repository( + name = "com_github_nytimes_gziphandler", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/NYTimes/gziphandler", + sum = "h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=", + version = "v1.1.1", + ) + go_repository( + name = "com_google_cloud_go_bigquery", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "cloud.google.com/go/bigquery", + sum = "h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU=", + version = "v1.0.1", + ) + go_repository( + name = "com_google_cloud_go_datastore", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "cloud.google.com/go/datastore", + sum = "h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM=", + version = "v1.0.0", + ) + go_repository( + name = "com_google_cloud_go_pubsub", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "cloud.google.com/go/pubsub", + sum = "h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8=", + version = "v1.0.1", + ) + go_repository( + name = "com_google_cloud_go_storage", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "cloud.google.com/go/storage", + sum = "h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4=", + version = "v1.0.0", + ) + go_repository( + name = "com_shuralyov_dmitri_gpu_mtl", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "dmitri.shuralyov.com/gpu/mtl", + sum = "h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY=", + version = "v0.0.0-20190408044501-666a987793e9", + ) + go_repository( + name = "io_rsc_binaryregexp", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "rsc.io/binaryregexp", + sum = "h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=", + version = "v0.2.0", + ) + go_repository( + name = "org_golang_x_image", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/image", + sum = "h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4=", + version = "v0.0.0-20190802002840-cff245a6509b", + ) + go_repository( + name = "org_golang_x_mobile", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "golang.org/x/mobile", + sum = "h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs=", + version = "v0.0.0-20190719004257-d2bd2a29d028", + ) + go_repository( + name = "com_github_bombsimon_wsl_v3", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/bombsimon/wsl/v3", + sum = "h1:w9f49xQatuaeTJFaNP4SpiWSR5vfT6IstPtM62JjcqA=", + version = "v3.0.0", + ) + go_repository( + name = "com_github_go_xmlfmt_xmlfmt", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/go-xmlfmt/xmlfmt", + sum = "h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo=", + version = "v0.0.0-20191208150333-d5b6f63a941b", + ) + go_repository( + name = "com_github_maratori_testpackage", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/maratori/testpackage", + sum = "h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ=", + version = "v1.0.1", + ) + go_repository( + name = "com_github_nakabonne_nestif", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/nakabonne/nestif", + sum = "h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw=", + version = "v0.3.0", + ) + go_repository( + name = "com_github_niemeyer_pretty", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/niemeyer/pretty", + sum = "h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=", + version = "v0.0.0-20200227124842-a10e7caefd8e", + ) + go_repository( + name = "com_github_phayes_checkstyle", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/phayes/checkstyle", + sum = "h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA=", + version = "v0.0.0-20170904204023-bfd46e6a821d", + ) + go_repository( + name = "com_github_ryancurrah_gomodguard", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/ryancurrah/gomodguard", + sum = "h1:vumZpZardqQ9EfFIZDNEpKaMxfqqEBMhu0uSRcDO5x4=", + version = "v1.0.2", + ) + go_repository( + name = "com_github_tetafro_godot", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/tetafro/godot", + sum = "h1:7+EYJM/Z4gYZhBFdRrVm6JTj5ZLw/QI1j4RfEOXJviE=", + version = "v0.2.5", + ) + go_repository( + name = "com_github_yuin_goldmark", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "github.com/yuin/goldmark", + sum = "h1:nqDD4MMMQA0lmWq03Z2/myGPYLQoXtmi0rGVs95ntbo=", + version = "v1.1.27", + ) diff --git a/vendor/k8s.io/repo-infra/tools/CROSSTOOL b/vendor/k8s.io/repo-infra/tools/CROSSTOOL new file mode 100755 index 0000000000..84a2c5c724 --- /dev/null +++ b/vendor/k8s.io/repo-infra/tools/CROSSTOOL @@ -0,0 +1,512 @@ +# Copyright YEAR The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# DO NOT EDIT +# This file contains the text format encoding of a +# com.google.devtools.build.lib.view.config.crosstool.CrosstoolRelease +# protocol buffer generated by generate_crosstool. + +major_version: "local" +minor_version: "" +toolchain: < + toolchain_identifier: "host" + host_system_name: "host" + target_system_name: "host" + target_cpu: "k8" + target_libc: "k8-local" + compiler: "gcc" + abi_version: "k8-local" + abi_libc_version: "k8-local" + tool_path: < + name: "ar" + path: "/usr/bin/ar" + > + tool_path: < + name: "ld" + path: "/usr/bin/ld" + > + tool_path: < + name: "cpp" + path: "/usr/bin/cpp" + > + tool_path: < + name: "dwp" + path: "/usr/bin/dwp" + > + tool_path: < + name: "gcc" + path: "/usr/bin/gcc" + > + tool_path: < + name: "gcov" + path: "/usr/bin/gcov" + > + tool_path: < + name: "ld" + path: "/usr/bin/ld" + > + tool_path: < + name: "nm" + path: "/usr/bin/nm" + > + tool_path: < + name: "objcopy" + path: "/usr/bin/objcopy" + > + tool_path: < + name: "objdump" + path: "/usr/bin/objdump" + > + tool_path: < + name: "strip" + path: "/usr/bin/strip" + > + supports_gold_linker: false + supports_start_end_lib: false + supports_interface_shared_objects: false + supports_incremental_linker: false + supports_normalizing_ar: false + supports_fission: false + needsPic: true + compiler_flag: "-U_FORTIFY_SOURCE" + compiler_flag: "-D_FORTIFY_SOURCE=1" + compiler_flag: "-fstack-protector" + compiler_flag: "-Wall" + compiler_flag: "-Wunused-but-set-parameter" + compiler_flag: "-Wno-free-nonheap-object" + compiler_flag: "-fno-omit-frame-pointer" + unfiltered_cxx_flag: "-no-canonical-prefixes" + unfiltered_cxx_flag: "-fno-canonical-system-headers" + unfiltered_cxx_flag: "-Wno-builtin-macro-redefined" + unfiltered_cxx_flag: "-D__DATE__=\"redacted\"" + unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\"" + unfiltered_cxx_flag: "-D__TIME__=\"redacted\"" + linker_flag: "-Wl,-z,relro,-z,now" + linker_flag: "-no-canonical-prefixes" + linker_flag: "-pass-exit-codes" + objcopy_embed_flag: "-I" + objcopy_embed_flag: "binary" + compilation_mode_flags: < + mode: DBG + compiler_flag: "-g" + > + compilation_mode_flags: < + mode: OPT + compiler_flag: "-g0" + compiler_flag: "-O2" + compiler_flag: "-DNDEBUG" + compiler_flag: "-ffunction-sections" + compiler_flag: "-fdata-sections" + linker_flag: "-Wl,--gc-sections" + > + linking_mode_flags: < + mode: DYNAMIC + > + cxx_builtin_include_directory: "/usr/lib/gcc" + cxx_builtin_include_directory: "/usr/local/include" + cxx_builtin_include_directory: "/usr/include" + builtin_sysroot: "" +> +toolchain: < + toolchain_identifier: "cross-arm-linux-gnueabihf" + host_system_name: "host" + target_system_name: "cross-arm-linux-gnueabihf" + target_cpu: "arm" + target_libc: "arm-linux-gnueabihf" + compiler: "gcc" + abi_version: "arm-linux-gnueabihf" + abi_libc_version: "arm-linux-gnueabihf" + tool_path: < + name: "ar" + path: "/usr/bin/arm-linux-gnueabihf-ar" + > + tool_path: < + name: "ld" + path: "/usr/bin/arm-linux-gnueabihf-ld" + > + tool_path: < + name: "cpp" + path: "/usr/bin/arm-linux-gnueabihf-cpp" + > + tool_path: < + name: "dwp" + path: "/usr/bin/arm-linux-gnueabihf-dwp" + > + tool_path: < + name: "gcc" + path: "/usr/bin/arm-linux-gnueabihf-gcc" + > + tool_path: < + name: "gcov" + path: "/usr/bin/arm-linux-gnueabihf-gcov" + > + tool_path: < + name: "ld" + path: "/usr/bin/arm-linux-gnueabihf-ld" + > + tool_path: < + name: "nm" + path: "/usr/bin/arm-linux-gnueabihf-nm" + > + tool_path: < + name: "objcopy" + path: "/usr/bin/arm-linux-gnueabihf-objcopy" + > + tool_path: < + name: "objdump" + path: "/usr/bin/arm-linux-gnueabihf-objdump" + > + tool_path: < + name: "strip" + path: "/usr/bin/arm-linux-gnueabihf-strip" + > + supports_gold_linker: false + supports_start_end_lib: false + supports_interface_shared_objects: false + supports_incremental_linker: false + supports_normalizing_ar: false + supports_fission: false + needsPic: true + compiler_flag: "-U_FORTIFY_SOURCE" + compiler_flag: "-D_FORTIFY_SOURCE=1" + compiler_flag: "-fstack-protector" + compiler_flag: "-Wall" + compiler_flag: "-Wunused-but-set-parameter" + compiler_flag: "-Wno-free-nonheap-object" + compiler_flag: "-fno-omit-frame-pointer" + unfiltered_cxx_flag: "-no-canonical-prefixes" + unfiltered_cxx_flag: "-fno-canonical-system-headers" + unfiltered_cxx_flag: "-Wno-builtin-macro-redefined" + unfiltered_cxx_flag: "-D__DATE__=\"redacted\"" + unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\"" + unfiltered_cxx_flag: "-D__TIME__=\"redacted\"" + linker_flag: "-Wl,-z,relro,-z,now" + linker_flag: "-no-canonical-prefixes" + linker_flag: "-pass-exit-codes" + objcopy_embed_flag: "-I" + objcopy_embed_flag: "binary" + compilation_mode_flags: < + mode: DBG + compiler_flag: "-g" + > + compilation_mode_flags: < + mode: OPT + compiler_flag: "-g0" + compiler_flag: "-O2" + compiler_flag: "-DNDEBUG" + compiler_flag: "-ffunction-sections" + compiler_flag: "-fdata-sections" + linker_flag: "-Wl,--gc-sections" + > + linking_mode_flags: < + mode: DYNAMIC + > + cxx_builtin_include_directory: "/usr/arm-linux-gnueabihf/include" + cxx_builtin_include_directory: "/usr/lib/gcc-cross/arm-linux-gnueabihf" + builtin_sysroot: "" +> +toolchain: < + toolchain_identifier: "cross-aarch64-linux-gnu" + host_system_name: "host" + target_system_name: "cross-aarch64-linux-gnu" + target_cpu: "aarch64" + target_libc: "aarch64-linux-gnu" + compiler: "gcc" + abi_version: "aarch64-linux-gnu" + abi_libc_version: "aarch64-linux-gnu" + tool_path: < + name: "ar" + path: "/usr/bin/aarch64-linux-gnu-ar" + > + tool_path: < + name: "ld" + path: "/usr/bin/aarch64-linux-gnu-ld" + > + tool_path: < + name: "cpp" + path: "/usr/bin/aarch64-linux-gnu-cpp" + > + tool_path: < + name: "dwp" + path: "/usr/bin/aarch64-linux-gnu-dwp" + > + tool_path: < + name: "gcc" + path: "/usr/bin/aarch64-linux-gnu-gcc" + > + tool_path: < + name: "gcov" + path: "/usr/bin/aarch64-linux-gnu-gcov" + > + tool_path: < + name: "ld" + path: "/usr/bin/aarch64-linux-gnu-ld" + > + tool_path: < + name: "nm" + path: "/usr/bin/aarch64-linux-gnu-nm" + > + tool_path: < + name: "objcopy" + path: "/usr/bin/aarch64-linux-gnu-objcopy" + > + tool_path: < + name: "objdump" + path: "/usr/bin/aarch64-linux-gnu-objdump" + > + tool_path: < + name: "strip" + path: "/usr/bin/aarch64-linux-gnu-strip" + > + supports_gold_linker: false + supports_start_end_lib: false + supports_interface_shared_objects: false + supports_incremental_linker: false + supports_normalizing_ar: false + supports_fission: false + needsPic: true + compiler_flag: "-U_FORTIFY_SOURCE" + compiler_flag: "-D_FORTIFY_SOURCE=1" + compiler_flag: "-fstack-protector" + compiler_flag: "-Wall" + compiler_flag: "-Wunused-but-set-parameter" + compiler_flag: "-Wno-free-nonheap-object" + compiler_flag: "-fno-omit-frame-pointer" + unfiltered_cxx_flag: "-no-canonical-prefixes" + unfiltered_cxx_flag: "-fno-canonical-system-headers" + unfiltered_cxx_flag: "-Wno-builtin-macro-redefined" + unfiltered_cxx_flag: "-D__DATE__=\"redacted\"" + unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\"" + unfiltered_cxx_flag: "-D__TIME__=\"redacted\"" + linker_flag: "-Wl,-z,relro,-z,now" + linker_flag: "-no-canonical-prefixes" + linker_flag: "-pass-exit-codes" + objcopy_embed_flag: "-I" + objcopy_embed_flag: "binary" + compilation_mode_flags: < + mode: DBG + compiler_flag: "-g" + > + compilation_mode_flags: < + mode: OPT + compiler_flag: "-g0" + compiler_flag: "-O2" + compiler_flag: "-DNDEBUG" + compiler_flag: "-ffunction-sections" + compiler_flag: "-fdata-sections" + linker_flag: "-Wl,--gc-sections" + > + linking_mode_flags: < + mode: DYNAMIC + > + cxx_builtin_include_directory: "/usr/aarch64-linux-gnu/include" + cxx_builtin_include_directory: "/usr/lib/gcc-cross/aarch64-linux-gnu" + builtin_sysroot: "" +> +toolchain: < + toolchain_identifier: "cross-powerpc64le-linux-gnu" + host_system_name: "host" + target_system_name: "cross-powerpc64le-linux-gnu" + target_cpu: "powerpc64le" + target_libc: "powerpc64le-linux-gnu" + compiler: "gcc" + abi_version: "powerpc64le-linux-gnu" + abi_libc_version: "powerpc64le-linux-gnu" + tool_path: < + name: "ar" + path: "/usr/bin/powerpc64le-linux-gnu-ar" + > + tool_path: < + name: "ld" + path: "/usr/bin/powerpc64le-linux-gnu-ld" + > + tool_path: < + name: "cpp" + path: "/usr/bin/powerpc64le-linux-gnu-cpp" + > + tool_path: < + name: "dwp" + path: "/usr/bin/powerpc64le-linux-gnu-dwp" + > + tool_path: < + name: "gcc" + path: "/usr/bin/powerpc64le-linux-gnu-gcc" + > + tool_path: < + name: "gcov" + path: "/usr/bin/powerpc64le-linux-gnu-gcov" + > + tool_path: < + name: "ld" + path: "/usr/bin/powerpc64le-linux-gnu-ld" + > + tool_path: < + name: "nm" + path: "/usr/bin/powerpc64le-linux-gnu-nm" + > + tool_path: < + name: "objcopy" + path: "/usr/bin/powerpc64le-linux-gnu-objcopy" + > + tool_path: < + name: "objdump" + path: "/usr/bin/powerpc64le-linux-gnu-objdump" + > + tool_path: < + name: "strip" + path: "/usr/bin/powerpc64le-linux-gnu-strip" + > + supports_gold_linker: false + supports_start_end_lib: false + supports_interface_shared_objects: false + supports_incremental_linker: false + supports_normalizing_ar: false + supports_fission: false + needsPic: true + compiler_flag: "-U_FORTIFY_SOURCE" + compiler_flag: "-D_FORTIFY_SOURCE=1" + compiler_flag: "-fstack-protector" + compiler_flag: "-Wall" + compiler_flag: "-Wunused-but-set-parameter" + compiler_flag: "-Wno-free-nonheap-object" + compiler_flag: "-fno-omit-frame-pointer" + unfiltered_cxx_flag: "-no-canonical-prefixes" + unfiltered_cxx_flag: "-fno-canonical-system-headers" + unfiltered_cxx_flag: "-Wno-builtin-macro-redefined" + unfiltered_cxx_flag: "-D__DATE__=\"redacted\"" + unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\"" + unfiltered_cxx_flag: "-D__TIME__=\"redacted\"" + linker_flag: "-Wl,-z,relro,-z,now" + linker_flag: "-no-canonical-prefixes" + linker_flag: "-pass-exit-codes" + objcopy_embed_flag: "-I" + objcopy_embed_flag: "binary" + compilation_mode_flags: < + mode: DBG + compiler_flag: "-g" + > + compilation_mode_flags: < + mode: OPT + compiler_flag: "-g0" + compiler_flag: "-O2" + compiler_flag: "-DNDEBUG" + compiler_flag: "-ffunction-sections" + compiler_flag: "-fdata-sections" + linker_flag: "-Wl,--gc-sections" + > + linking_mode_flags: < + mode: DYNAMIC + > + cxx_builtin_include_directory: "/usr/powerpc64le-linux-gnu/include" + cxx_builtin_include_directory: "/usr/lib/gcc-cross/powerpc64le-linux-gnu" + builtin_sysroot: "" +> +toolchain: < + toolchain_identifier: "cross-s390x-linux-gnu" + host_system_name: "host" + target_system_name: "cross-s390x-linux-gnu" + target_cpu: "s390x" + target_libc: "s390x-linux-gnu" + compiler: "gcc" + abi_version: "s390x-linux-gnu" + abi_libc_version: "s390x-linux-gnu" + tool_path: < + name: "ar" + path: "/usr/bin/s390x-linux-gnu-ar" + > + tool_path: < + name: "ld" + path: "/usr/bin/s390x-linux-gnu-ld" + > + tool_path: < + name: "cpp" + path: "/usr/bin/s390x-linux-gnu-cpp" + > + tool_path: < + name: "dwp" + path: "/usr/bin/s390x-linux-gnu-dwp" + > + tool_path: < + name: "gcc" + path: "/usr/bin/s390x-linux-gnu-gcc" + > + tool_path: < + name: "gcov" + path: "/usr/bin/s390x-linux-gnu-gcov" + > + tool_path: < + name: "ld" + path: "/usr/bin/s390x-linux-gnu-ld" + > + tool_path: < + name: "nm" + path: "/usr/bin/s390x-linux-gnu-nm" + > + tool_path: < + name: "objcopy" + path: "/usr/bin/s390x-linux-gnu-objcopy" + > + tool_path: < + name: "objdump" + path: "/usr/bin/s390x-linux-gnu-objdump" + > + tool_path: < + name: "strip" + path: "/usr/bin/s390x-linux-gnu-strip" + > + supports_gold_linker: false + supports_start_end_lib: false + supports_interface_shared_objects: false + supports_incremental_linker: false + supports_normalizing_ar: false + supports_fission: false + needsPic: true + compiler_flag: "-U_FORTIFY_SOURCE" + compiler_flag: "-D_FORTIFY_SOURCE=1" + compiler_flag: "-fstack-protector" + compiler_flag: "-Wall" + compiler_flag: "-Wunused-but-set-parameter" + compiler_flag: "-Wno-free-nonheap-object" + compiler_flag: "-fno-omit-frame-pointer" + unfiltered_cxx_flag: "-no-canonical-prefixes" + unfiltered_cxx_flag: "-fno-canonical-system-headers" + unfiltered_cxx_flag: "-Wno-builtin-macro-redefined" + unfiltered_cxx_flag: "-D__DATE__=\"redacted\"" + unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\"" + unfiltered_cxx_flag: "-D__TIME__=\"redacted\"" + linker_flag: "-Wl,-z,relro,-z,now" + linker_flag: "-no-canonical-prefixes" + linker_flag: "-pass-exit-codes" + objcopy_embed_flag: "-I" + objcopy_embed_flag: "binary" + compilation_mode_flags: < + mode: DBG + compiler_flag: "-g" + > + compilation_mode_flags: < + mode: OPT + compiler_flag: "-g0" + compiler_flag: "-O2" + compiler_flag: "-DNDEBUG" + compiler_flag: "-ffunction-sections" + compiler_flag: "-fdata-sections" + linker_flag: "-Wl,--gc-sections" + > + linking_mode_flags: < + mode: DYNAMIC + > + cxx_builtin_include_directory: "/usr/s390x-linux-gnu/include" + cxx_builtin_include_directory: "/usr/lib/gcc-cross/s390x-linux-gnu" + builtin_sysroot: "" +> diff --git a/vendor/k8s.io/repo-infra/tools/build_tar/BUILD.bazel b/vendor/k8s.io/repo-infra/tools/build_tar/BUILD.bazel new file mode 100644 index 0000000000..7f081a7f4a --- /dev/null +++ b/vendor/k8s.io/repo-infra/tools/build_tar/BUILD.bazel @@ -0,0 +1,32 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["buildtar.go"], + importpath = "k8s.io/repo-infra/tools/build_tar", + visibility = ["//visibility:private"], + deps = [ + "@io_k8s_klog_v2//:go_default_library", + "@org_golang_x_build//pargzip:go_default_library", + ], +) + +go_binary( + name = "build_tar", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/repo-infra/tools/build_tar/buildtar.go b/vendor/k8s.io/repo-infra/tools/build_tar/buildtar.go new file mode 100644 index 0000000000..d53126b78c --- /dev/null +++ b/vendor/k8s.io/repo-infra/tools/build_tar/buildtar.go @@ -0,0 +1,611 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// fast tar builder for bazel +package main + +import ( + "archive/tar" + "bufio" + "compress/bzip2" + "compress/gzip" + "flag" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strconv" + "strings" + "time" + + "golang.org/x/build/pargzip" + + "k8s.io/klog/v2" +) + +func main() { + var ( + flagfile string + + output string + directory string + compression string + + files multiString + tars multiString + debs multiString + links multiString + + mode string + modes multiString + + owner string + owners multiString + ownerName string + ownerNames multiString + + mtime string + ) + + flag.StringVar(&flagfile, "flagfile", "", "Path to flagfile") + + flag.StringVar(&output, "output", "", "The output file, mandatory") + flag.StringVar(&directory, "directory", "", "Directory in which to store the file inside the layer") + flag.StringVar(&compression, "compression", "", "Compression (`gz` or `bz2`), default is none.") + + flag.Var(&files, "file", "A file to add to the layer") + flag.Var(&tars, "tar", "A tar file to add to the layer") + flag.Var(&debs, "deb", "A debian package to add to the layer") + flag.Var(&links, "link", "Add a symlink a inside the layer ponting to b if a:b is specified") + + flag.StringVar(&mode, "mode", "", "Force the mode on the added files (in octal).") + flag.Var(&modes, "modes", "Specific mode to apply to specific file (from the file argument), e.g., path/to/file=0455.") + + flag.StringVar(&owner, "owner", "0.0", "Specify the numeric default owner of all files, e.g., 0.0") + flag.Var(&owners, "owners", "Specify the numeric owners of individual files, e.g. path/to/file=0.0.") + flag.StringVar(&ownerName, "owner_name", "", "Specify the owner name of all files, e.g. root.root.") + flag.Var(&ownerNames, "owner_names", "Specify the owner names of individual files, e.g. path/to/file=root.root.") + + flag.StringVar(&mtime, "mtime", "", + "mtime to set on tar file entries. May be an integer (corresponding to epoch seconds) or the value \"portable\", which will use the value 2000-01-01, usable with non *nix OSes") + + flag.Set("logtostderr", "true") + + flag.Parse() + + if flagfile != "" { + b, err := ioutil.ReadFile(flagfile) + if err != nil { + klog.Fatalf("couldn't read flagfile: %v", err) + } + cmdline := strings.Split(string(b), "\n") + flag.CommandLine.Parse(cmdline) + } + + if output == "" { + klog.Fatalf("--output flag is required") + } + + parsedMtime, err := parseMtimeFlag(mtime) + if err != nil { + klog.Fatalf("invalid value for --mtime: %s", mtime) + } + + meta := newFileMeta(mode, modes, owner, owners, ownerName, ownerNames, parsedMtime) + + tf, err := newTarFile(output, directory, compression, meta) + if err != nil { + klog.Fatalf("couldn't build tar: %v", err) + } + defer tf.Close() + + for _, file := range files { + parts := strings.SplitN(file, "=", 2) + if len(parts) != 2 { + klog.Fatalf("bad parts length for file %q", file) + } + if err := tf.addFile(parts[0], parts[1]); err != nil { + klog.Fatalf("couldn't add file: %v", err) + } + } + + for _, tar := range tars { + if err := tf.addTar(tar); err != nil { + klog.Fatalf("couldn't add tar: %v", err) + } + } + + for _, deb := range debs { + if err := tf.addDeb(deb); err != nil { + klog.Fatalf("couldn't add deb: %v", err) + } + } + + for _, link := range links { + parts := strings.SplitN(link, ":", 2) + if len(parts) != 2 { + klog.Fatalf("bad parts length for link %q", link) + } + if err := tf.addLink(parts[0], parts[1]); err != nil { + klog.Fatalf("couldn't add link: %v", err) + } + } +} + +type tarFile struct { + directory string + + tw *tar.Writer + + meta fileMeta + dirsMade map[string]struct{} + filesMade map[string]struct{} + + closers []func() +} + +func newTarFile(output, directory, compression string, meta fileMeta) (*tarFile, error) { + var ( + w io.Writer + closers []func() + ) + f, err := os.Create(output) + if err != nil { + return nil, err + } + closers = append(closers, func() { + f.Close() + }) + w = f + + buf := bufio.NewWriter(w) + closers = append(closers, func() { buf.Flush() }) + w = buf + + switch compression { + case "": + case "gz": + gzw := pargzip.NewWriter(w) + closers = append(closers, func() { gzw.Close() }) + w = gzw + case "bz2", "xz": + return nil, fmt.Errorf("%q compression is not supported yet", compression) + default: + return nil, fmt.Errorf("unknown compression %q", compression) + } + + tw := tar.NewWriter(w) + closers = append(closers, func() { tw.Close() }) + + return &tarFile{ + directory: directory, + tw: tw, + closers: closers, + meta: meta, + dirsMade: map[string]struct{}{}, + filesMade: map[string]struct{}{}, + }, nil +} + +func (f *tarFile) addFile(file, dest string) error { + dest = strings.TrimLeft(dest, "/") + dest = filepath.Clean(dest) + + uid := f.meta.getUID(dest) + gid := f.meta.getGID(dest) + uname := f.meta.getUname(dest) + gname := f.meta.getGname(dest) + + dest = filepath.Join(strings.TrimLeft(f.directory, "/"), dest) + dest = filepath.Clean(dest) + + if ok := f.tryReservePath(dest); !ok { + klog.Warningf("Duplicate file in archive: %v, picking first occurence", dest) + return nil + } + + info, err := os.Stat(file) + if err != nil { + return err + } + + mode := f.meta.getMode(dest) + // If mode is unspecified, derive the mode from the file's mode. + if mode == 0 { + mode = os.FileMode(0644) + if info.Mode().Perm()&os.FileMode(0111) != 0 { + mode = os.FileMode(0755) + } + } + + header := tar.Header{ + Name: dest, + Mode: int64(mode), + Uid: uid, + Gid: gid, + Size: 0, + Uname: uname, + Gname: gname, + ModTime: f.meta.modTime, + } + + if err := f.makeDirs(header); err != nil { + return err + } + + switch { + case info.Mode()&os.ModeSymlink != 0: + return fmt.Errorf("addFile: didn't expect symlink: %s", file) + case info.Mode()&os.ModeNamedPipe != 0: + return fmt.Errorf("addFile: didn't expect named pipe: %s", file) + case info.Mode()&os.ModeSocket != 0: + return fmt.Errorf("addFile: didn't expect socket: %s", file) + case info.Mode()&os.ModeDevice != 0: + return fmt.Errorf("addFile: didn't expect device: %s", file) + case info.Mode()&os.ModeDir != 0: + header.Typeflag = tar.TypeDir + if err := f.tw.WriteHeader(&header); err != nil { + return err + } + default: + //regular file + header.Typeflag = tar.TypeReg + b, err := ioutil.ReadFile(file) + if err != nil { + return err + } + header.Size = int64(len(b)) + if err := f.tw.WriteHeader(&header); err != nil { + return err + } + if _, err := f.tw.Write(b); err != nil { + return err + } + } + return nil +} + +func (f *tarFile) addLink(symlink, target string) error { + if ok := f.tryReservePath(symlink); !ok { + klog.Warningf("Duplicate file in archive: %v, picking first occurence", symlink) + return nil + } + header := tar.Header{ + Name: symlink, + Typeflag: tar.TypeSymlink, + Linkname: target, + Mode: int64(0777), // symlinks should always have 0777 mode + ModTime: f.meta.modTime, + } + if err := f.makeDirs(header); err != nil { + return err + } + return f.tw.WriteHeader(&header) +} + +func (f *tarFile) addTar(toAdd string) error { + root := "" + if f.directory != "/" { + root = f.directory + } + + var r io.Reader + + file, err := os.Open(toAdd) + if err != nil { + return err + } + defer file.Close() + r = file + + r = bufio.NewReader(r) + + switch { + case strings.HasSuffix(toAdd, "gz"): + gzr, err := gzip.NewReader(r) + if err != nil { + return err + } + r = gzr + case strings.HasSuffix(toAdd, "bz2"): + bz2r := bzip2.NewReader(r) + r = bz2r + case strings.HasSuffix(toAdd, "xz"): + return fmt.Errorf("%q decompression is not supported yet", toAdd) + default: + } + + tr := tar.NewReader(r) + + for { + header, err := tr.Next() + if err == io.EOF { + break + } + if err != nil { + return err + } + header.Name = filepath.Join(root, header.Name) + if header.Typeflag == tar.TypeDir && !strings.HasSuffix(header.Name, "/") { + header.Name = header.Name + "/" + } else if ok := f.tryReservePath(header.Name); !ok { + klog.Warningf("Duplicate file in archive: %v, picking first occurence", header.Name) + continue + } + // Create root directories with same permissions if missing. + // makeDirs keeps track of which directories exist, + // so it's safe to duplicate this here. + if err = f.makeDirs(*header); err != nil { + return err + } + // If this is a directory, then makeDirs already created it, + // so skip to the next entry. + if header.Typeflag == tar.TypeDir { + continue + } + err = f.tw.WriteHeader(header) + if err != nil { + return err + } + if _, err = io.Copy(f.tw, tr); err != nil { + return err + } + } + return nil +} + +func (f *tarFile) addDeb(toAdd string) error { + return fmt.Errorf("addDeb unimplemented") +} + +func (f *tarFile) makeDirs(header tar.Header) error { + dirToMake := []string{} + dir := header.Name + for { + dir = filepath.Dir(dir) + if dir == "." || dir == "/" { + break + } + dirToMake = append(dirToMake, dir) + } + for i := len(dirToMake) - 1; i >= 0; i-- { + dir := dirToMake[i] + if _, ok := f.dirsMade[dir]; ok { + continue + } + dh := header + // Add the x bit to directories if the read bit is set, + // and make sure all directories are at least user RWX. + dh.Mode = header.Mode | 0700 | ((0444 & header.Mode) >> 2) + dh.Typeflag = tar.TypeDir + dh.Name = dir + "/" + if err := f.tw.WriteHeader(&dh); err != nil { + return err + } + + f.dirsMade[dir] = struct{}{} + } + return nil +} + +func (f *tarFile) tryReservePath(path string) bool { + if _, ok := f.filesMade[path]; ok { + return false + } + if _, ok := f.dirsMade[path]; ok { + return false + } + f.filesMade[path] = struct{}{} + return true +} + +func (f *tarFile) Close() { + for i := len(f.closers) - 1; i >= 0; i-- { + f.closers[i]() + } +} + +// parseMtimeFlag matches the functionality of Bazel's python-based build_tar and archive modules +// for the --mtime flag. +// In particular: +// - if no value is provided, use the Unix epoch +// - if the string "portable" is provided, use a "deterministic date compatible with non *nix OSes" +// - if an integer is provided, interpret that as the number of seconds since Unix epoch +func parseMtimeFlag(input string) (time.Time, error) { + if input == "" { + return time.Unix(0, 0), nil + } else if input == "portable" { + // A deterministic time compatible with non *nix OSes. + // See also https://github.com/bazelbuild/bazel/issues/1299. + return time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC), nil + } + seconds, err := strconv.ParseInt(input, 10, 64) + if err != nil { + return time.Unix(0, 0), err + } + return time.Unix(seconds, 0), nil +} + +func newFileMeta( + mode string, + modes multiString, + owner string, + owners multiString, + ownerName string, + ownerNames multiString, + modTime time.Time, +) fileMeta { + meta := fileMeta{ + modTime: modTime, + } + + if mode != "" { + i, err := strconv.ParseUint(mode, 8, 32) + if err != nil { + klog.Fatalf("couldn't parse mode: %v", mode) + } + meta.defaultMode = os.FileMode(i) + } + + meta.modeMap = map[string]os.FileMode{} + for _, filemode := range modes { + parts := strings.SplitN(filemode, "=", 2) + if len(parts) != 2 { + klog.Fatalf("expected two parts to %q", filemode) + } + if parts[0][0] == '/' { + parts[0] = parts[0][1:] + } + i, err := strconv.ParseUint(parts[1], 8, 32) + if err != nil { + klog.Fatalf("couldn't parse mode: %v", filemode) + } + meta.modeMap[parts[0]] = os.FileMode(i) + } + + if ownerName != "" { + parts := strings.SplitN(ownerName, ".", 2) + if len(parts) != 2 { + klog.Fatalf("expected two parts to %q", ownerName) + } + meta.defaultUname = parts[0] + meta.defaultGname = parts[1] + } + + meta.unameMap = map[string]string{} + meta.gnameMap = map[string]string{} + for _, name := range ownerNames { + parts := strings.SplitN(name, "=", 2) + if len(parts) != 2 { + klog.Fatalf("expected two parts to %q %v", name, parts) + } + filename, ownername := parts[0], parts[1] + + parts = strings.SplitN(ownername, ".", 2) + if len(parts) != 2 { + klog.Fatalf("expected two parts to %q", name) + } + uname, gname := parts[0], parts[1] + + meta.unameMap[filename] = uname + meta.gnameMap[filename] = gname + } + + if owner != "" { + parts := strings.SplitN(owner, ".", 2) + if len(parts) != 2 { + klog.Fatalf("expected two parts to %q", owner) + } + uid, err := strconv.Atoi(parts[0]) + if err != nil { + klog.Fatalf("could not parse uid: %q", parts[0]) + } + gid, err := strconv.Atoi(parts[1]) + if err != nil { + klog.Fatalf("could not parse gid: %q", parts[1]) + } + meta.defaultUID = uid + meta.defaultGID = gid + + } + + meta.uidMap = map[string]int{} + meta.gidMap = map[string]int{} + for _, owner := range owners { + parts := strings.SplitN(owner, "=", 2) + if len(parts) != 2 { + klog.Fatalf("expected two parts to %q", owner) + } + filename, owner := parts[0], parts[1] + + parts = strings.SplitN(parts[1], ".", 2) + if len(parts) != 2 { + klog.Fatalf("expected two parts to %q", owner) + } + uid, err := strconv.Atoi(parts[0]) + if err != nil { + klog.Fatalf("could not parse uid: %q", parts[0]) + } + gid, err := strconv.Atoi(parts[1]) + if err != nil { + klog.Fatalf("could not parse gid: %q", parts[1]) + } + meta.uidMap[filename] = uid + meta.gidMap[filename] = gid + } + + return meta +} + +type fileMeta struct { + defaultGID, defaultUID int + gidMap, uidMap map[string]int + + defaultGname, defaultUname string + gnameMap, unameMap map[string]string + + defaultMode os.FileMode + modeMap map[string]os.FileMode + + modTime time.Time +} + +func (f *fileMeta) getGID(fname string) int { + if id, ok := f.gidMap[fname]; ok { + return id + } + return f.defaultGID +} + +func (f *fileMeta) getUID(fname string) int { + if id, ok := f.uidMap[fname]; ok { + return id + } + return f.defaultUID +} + +func (f *fileMeta) getGname(fname string) string { + if name, ok := f.gnameMap[fname]; ok { + return name + } + return f.defaultGname +} + +func (f *fileMeta) getUname(fname string) string { + if name, ok := f.unameMap[fname]; ok { + return name + } + return f.defaultUname +} + +func (f *fileMeta) getMode(fname string) os.FileMode { + if mode, ok := f.modeMap[fname]; ok { + return mode + } + return f.defaultMode +} + +type multiString []string + +func (ms *multiString) String() string { + return strings.Join(*ms, ",") +} + +func (ms *multiString) Set(v string) error { + *ms = append(*ms, v) + return nil +} diff --git a/vendor/k8s.io/repo-infra/verify/BUILD.bazel b/vendor/k8s.io/repo-infra/verify/BUILD.bazel new file mode 100644 index 0000000000..841a623193 --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/BUILD.bazel @@ -0,0 +1,16 @@ +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//verify/boilerplate:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/repo-infra/verify/README.md b/vendor/k8s.io/repo-infra/verify/README.md new file mode 100644 index 0000000000..6eca4ece1b --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/README.md @@ -0,0 +1,52 @@ +# Verification scripts + +Collection of scripts that verifies that a project meets requirements set for kubernetes related projects. The scripts are to be invoked depending on the needs via CI tooling, such as Travis CI. See main Readme file on how to integrate the repo-infra in your project. + +The scripts are currently being migrated from the main kubernetes repository. If your project requires additional set of verifications, consider creating an issue/PR on repo-infra to avoid code duplication across multiple projects. + +If repo-infra is integrated at the root of your project as git submodule at path: `/repo-infra`, +then scripts can be invoked as `repo-infra/verify/verify-*.sh` + +travis.yaml example: + +``` +dist: trusty + +os: +- linux + +language: go + +go: +- 1.8 + +before_install: +- go get -u github.com/alecthomas/gometalinter + +install: +- gometalinter --install + +script: +- repo-infra/verify/verify-go-src.sh -v +- repo-infra/verify/verify-boilerplate.sh +# OR with vendoring +# - vendor/github.com/kubernetes/repo-infra/verify-go-src.sh --rootdir=$(pwd) -v +``` + +## Verify boilerplate + +Verifies that the boilerplate for various formats (go files, Makefile, etc.) is included in each file: `verify-boilerplate.sh`. + +## Verify go source code + +Runs a set of scripts on the go source code excluding vendored files: `verify-go-src.sh`. Expects `gometalinter` tooling installed (see travis file above) + +With git submodule from your repo root: `repo-infra/verify/verify-go-src.sh -v` + +With vendoring: `vendor/repo-infra/verify/verify-go-src.sh -v --rootdir $(pwd)` + +Checks include: + +1. gofmt +2. gometalinter +3. govet diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/BUILD.bazel b/vendor/k8s.io/repo-infra/verify/boilerplate/BUILD.bazel new file mode 100644 index 0000000000..245e4be71c --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/BUILD.bazel @@ -0,0 +1,29 @@ +# gazelle:exclude test +# gazelle:exclude verify/boilerplate/test +package(default_visibility = ["//visibility:public"]) + +exports_files(glob(["*.txt"])) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) + +filegroup( + name = "templates", + srcs = glob(["boilerplate.*.txt"]), +) + +filegroup( + name = "testdata", + srcs = glob(["test/**"]), +) diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.Dockerfile.txt b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.Dockerfile.txt new file mode 100644 index 0000000000..384f325abf --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.Dockerfile.txt @@ -0,0 +1,14 @@ +# Copyright YEAR The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.Makefile.txt b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.Makefile.txt new file mode 100644 index 0000000000..384f325abf --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.Makefile.txt @@ -0,0 +1,14 @@ +# Copyright YEAR The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.bzl.txt b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.bzl.txt new file mode 100644 index 0000000000..384f325abf --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.bzl.txt @@ -0,0 +1,14 @@ +# Copyright YEAR The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.go.txt b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.go.txt new file mode 100644 index 0000000000..59e740c1ee --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.go.txt @@ -0,0 +1,16 @@ +/* +Copyright YEAR The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.py.txt b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.py.txt new file mode 100644 index 0000000000..384f325abf --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.py.txt @@ -0,0 +1,14 @@ +# Copyright YEAR The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.sh.txt b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.sh.txt new file mode 100644 index 0000000000..384f325abf --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/boilerplate.sh.txt @@ -0,0 +1,14 @@ +# Copyright YEAR The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/test/fail.go b/vendor/k8s.io/repo-infra/verify/boilerplate/test/fail.go new file mode 100644 index 0000000000..16159c5ac0 --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/test/fail.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Kubernetes Authors. + +fail + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package test diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/test/fail.py b/vendor/k8s.io/repo-infra/verify/boilerplate/test/fail.py new file mode 100644 index 0000000000..cbdd06ff8a --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/test/fail.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +# Copyright 2015 The Kubernetes Authors. +# +# failed +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/test/pass.go b/vendor/k8s.io/repo-infra/verify/boilerplate/test/pass.go new file mode 100644 index 0000000000..7508448aae --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/test/pass.go @@ -0,0 +1,17 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package test diff --git a/vendor/k8s.io/repo-infra/verify/boilerplate/test/pass.py b/vendor/k8s.io/repo-infra/verify/boilerplate/test/pass.py new file mode 100644 index 0000000000..5b7ce29a25 --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/boilerplate/test/pass.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +# Copyright 2015 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +True diff --git a/vendor/k8s.io/repo-infra/verify/go_install_from_commit.sh b/vendor/k8s.io/repo-infra/verify/go_install_from_commit.sh new file mode 100755 index 0000000000..ee6fd0d9c1 --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/go_install_from_commit.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# Copyright 2017 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + +PKG=$1 +COMMIT=$2 +export GOPATH=$3 +export GOBIN="$GOPATH/bin" + +go get -d -u "${PKG}" +cd "${GOPATH}/src/${PKG}" +git checkout -q "${COMMIT}" +go install "${PKG}" diff --git a/vendor/k8s.io/repo-infra/verify/verify-bazel.sh b/vendor/k8s.io/repo-infra/verify/verify-bazel.sh new file mode 100755 index 0000000000..9929547a38 --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/verify-bazel.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# TODO(fejta): delete this file + +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +bazel test @io_k8s_repo_infra//hack:verify-deps diff --git a/vendor/k8s.io/repo-infra/verify/verify-boilerplate.sh b/vendor/k8s.io/repo-infra/verify/verify-boilerplate.sh new file mode 100755 index 0000000000..e9e631e76d --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/verify-boilerplate.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Copyright 2014 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# TODO(fejta): delete this file + +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +bazel test @io_k8s_repo_infra//hack:verify-boilerplate diff --git a/vendor/k8s.io/repo-infra/verify/verify-errexit.sh b/vendor/k8s.io/repo-infra/verify/verify-errexit.sh new file mode 100755 index 0000000000..a30f31c48c --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/verify-errexit.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright 2017 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script will verify that the specified script files have +# "set -o errexit" turned on at some point. +# +# Usage: verify-errexit.sh [ dir | file ... ] +# default args is the root of our source tree + +set -o errexit +set -o nounset +set -o pipefail + +REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. + +if [[ "$*" != "" ]]; then + args="$*" +else + args=$(ls "${REPO_ROOT}" | grep -v vendor | grep -v glide) +fi + +# Gather the list of files that appear to be shell scripts. +# Meaning they have some form of "#!...sh" as a line in them. +shFiles=$(grep -rl '^#!.*sh$' ${args}) + +rc="0" +for file in ${shFiles}; do + grep "set -o errexit" ${file} &> /dev/null && continue + grep "set -[a-z]*e" ${file} &> /dev/null && continue + + echo ${file}: appears to be missing \"set -o errexit\" + rc="1" +done + +exit ${rc} + diff --git a/vendor/k8s.io/repo-infra/verify/verify-go-src.sh b/vendor/k8s.io/repo-infra/verify/verify-go-src.sh new file mode 100755 index 0000000000..cdc82f1640 --- /dev/null +++ b/vendor/k8s.io/repo-infra/verify/verify-go-src.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Copyright 2017 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +bazel test @io_k8s_repo_infra//hack:verify-all