aboutsummaryrefslogtreecommitdiff
path: root/go/def.bzl
blob: 83c88e395bd7691125baabbef3d8fa55c66e0bfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Copyright 2014 The Bazel Authors. All rights reserved.
#
# 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(
    "@io_bazel_rules_go//go/private:context.bzl",
    "go_context",
)
load(
    "@io_bazel_rules_go//go/private:providers.bzl",
    _GoArchive = "GoArchive",
    _GoArchiveData = "GoArchiveData",
    _GoLibrary = "GoLibrary",
    _GoPath = "GoPath",
    _GoSDK = "GoSDK",
    _GoSource = "GoSource",
)
load(
    "@io_bazel_rules_go//go/private:repositories.bzl",
    "go_register_toolchains",
    "go_rules_dependencies",
)
load(
    "@io_bazel_rules_go//go/private:sdk.bzl",
    "go_download_sdk",
    "go_host_sdk",
    "go_local_sdk",
    "go_wrap_sdk",
)
load(
    "@io_bazel_rules_go//go/private:rules/sdk.bzl",
    "go_sdk",
)
load(
    "@io_bazel_rules_go//go/private:go_toolchain.bzl",
    "go_toolchain",
)
load(
    "@io_bazel_rules_go//go/private:rules/wrappers.bzl",
    _go_binary_macro = "go_binary_macro",
    _go_library_macro = "go_library_macro",
    _go_test_macro = "go_test_macro",
)
load(
    "@io_bazel_rules_go//go/private:rules/source.bzl",
    _go_source = "go_source",
)
load(
    "@io_bazel_rules_go//extras:embed_data.bzl",
    "go_embed_data",
)
load(
    "@io_bazel_rules_go//go/private:tools/gazelle.bzl",
    "gazelle",
)
load(
    "@io_bazel_rules_go//go/private:tools/path.bzl",
    _go_path = "go_path",
)
load(
    "@io_bazel_rules_go//go/private:tools/vet.bzl",
    _go_vet_test = "go_vet_test",
)
load(
    "@io_bazel_rules_go//go/private:rules/rule.bzl",
    _go_rule = "go_rule",
)

# Current version or next version to be tagged. Gazelle and other tools may
# check this to determine compatibility.
RULES_GO_VERSION = "0.14.0"

GoLibrary = _GoLibrary
"""See go/providers.rst#GoLibrary for full documentation."""

GoSource = _GoSource
"""See go/providers.rst#GoSource for full documentation."""

GoPath = _GoPath
"""See go/providers.rst#GoPath for full documentation."""

GoArchive = _GoArchive
"""See go/providers.rst#GoArchive for full documentation."""

GoArchiveData = _GoArchiveData
"""See go/providers.rst#GoArchiveData for full documentation."""

GoSDK = _GoSDK
"""See go/providers.rst#GoSDK for full documentation."""

go_library = _go_library_macro
"""See go/core.rst#go_library for full documentation."""

go_binary = _go_binary_macro
"""See go/core.rst#go_binary for full documentation."""

go_test = _go_test_macro
"""See go/core.rst#go_test for full documentation."""

go_source = _go_source
"""See go/core.rst#go_test for full documentation."""

go_rule = _go_rule
"""See go/core.rst#go_rule for full documentation."""

go_path = _go_path
"""
    go_path is a rule for creating `go build` compatible file layouts from a set of Bazel.
    targets.
        "deps": attr.label_list(providers=[GoLibrary]), # The set of go libraries to include the export
        "mode": attr.string(default="link", values=["link", "copy"]) # Whether to copy files or produce soft links
"""

go_vet_test = _go_vet_test
"""
    go_vet_test
"""