Skip to content

Commit

Permalink
go/toolchains.rst: Remove reference to deprecated go_rule (bazel-cont…
Browse files Browse the repository at this point in the history
…rib#3486)

The definition of the go_rule function in now prints the following
message:

    The go_rule function has been removed. Use rule directly instead.

Remove reference to go_rule from the go_context documentation.

Co-authored-by: Zhongpeng Lin <[email protected]>
  • Loading branch information
evanj and linzhp authored Apr 7, 2023
1 parent 5037c00 commit 6e8e7ec
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions go/toolchains.rst
Original file line number Diff line number Diff line change
Expand Up @@ -505,24 +505,14 @@ go_context
~~~~~~~~~~

This collects the information needed to form and return a :type:`GoContext` from
a rule ctx. It uses the attributes and the toolchains. It can only be used in
the implementation of a rule that has the go toolchain attached and the go
context data as an attribute. To do this declare the rule using the go_rule
wrapper.
a rule ctx. It uses the attributes and the toolchains.

.. code:: bzl
def _my_rule_impl(ctx):
go = go_context(ctx)
...
my_rule = go_rule(
_my_rule_impl,
attrs = {
...
},
)
+--------------------------------+-----------------------------+-----------------------------------+
| **Name** | **Type** | **Default value** |
Expand Down

0 comments on commit 6e8e7ec

Please sign in to comment.