Serge Bazanski | 6ebdc41 | 2021-05-21 16:25:55 +0200 | [diff] [blame] | 1 | Copyright 2021 The Monogon Project Authors. |
| 2 | |
| 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | you may not use this file except in compliance with the License. |
| 5 | You may obtain a copy of the License at |
| 6 | |
| 7 | http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | |
| 9 | Unless required by applicable law or agreed to in writing, software |
| 10 | distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | See the License for the specific language governing permissions and |
| 13 | limitations under the License. |
| 14 | |
| 15 | This adds a go_tool_library target to github.com/corverroos/commentwrap. This can |
| 16 | be removed when go_tool_library gets replaced with transitions: |
| 17 | https://github.com/bazelbuild/rules_go/issues/2374 |
| 18 | |
| 19 | diff -ur a/BUILD.bazel b/BUILD.bazel |
| 20 | --- a/BUILD.bazel 2021-05-20 13:21:49.582041541 +0200 |
| 21 | +++ b/BUILD.bazel 2021-05-21 14:25:51.550052340 +0200 |
| 22 | @@ -1,4 +1,15 @@ |
| 23 | -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") |
| 24 | +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test", "go_tool_library") |
| 25 | + |
| 26 | +go_tool_library( |
| 27 | + name = "go_tool_library", |
| 28 | + srcs = ["commentwrap.go"], |
| 29 | + importpath = "github.com/corverroos/commentwrap", |
| 30 | + visibility = ["//visibility:public"], |
| 31 | + deps = [ |
| 32 | + "@com_github_muesli_reflow//:go_tool_library", |
| 33 | + "@org_golang_x_tools//go/analysis:go_tool_library", |
| 34 | + ], |
| 35 | +) |
| 36 | |
| 37 | go_library( |
| 38 | name = "go_default_library", |