go_embed_data(name, flatten, package, src, srcs, string, unpack, var)**ATTRIBUTES** | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | flatten | - | Boolean | optional | False | | package | - | String | optional | "" | | src | - | Label | optional | None | | srcs | - | List of labels | optional | [] | | string | - | Boolean | optional | False | | unpack | - | Boolean | optional | False | | var | - | String | optional | "Data" | ## go_path
go_path(name, data, deps, include_data, include_pkg, mode)**ATTRIBUTES** | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | data | - | List of labels | optional | [] | | deps | - | List of labels | optional | [] | | include_data | - | Boolean | optional | True | | include_pkg | - | Boolean | optional | False | | mode | - | String | optional | "copy" | ## go_sdk
go_sdk(name, go, goarch, goos, headers, libs, package_list, root_file, srcs, tools)Collects information about a Go SDK. The SDK must have a normal GOROOT directory structure. **ATTRIBUTES** | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | go | The go binary | Label | required | | | goarch | The host architecture the SDK was built for | String | required | | | goos | The host OS the SDK was built for | String | required | | | headers | .h files from pkg/include that may be included in assembly sources | List of labels | optional | [] | | libs | Pre-compiled .a files for the standard library, built for the execution platform | List of labels | optional | [] | | package_list | A text file containing a list of packages in the standard library that may be imported. | Label | optional | None | | root_file | A file in the SDK root directory. Used to determine GOROOT. | Label | required | | | srcs | Source files for packages in the standard library | List of labels | optional | [] | | tools | List of executable files in the SDK built for the execution platform, excluding the go binary | List of labels | optional | [] | ## go_source
go_source(name, data, deps, embed, gc_goopts, srcs)**ATTRIBUTES** | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | data | - | List of labels | optional | [] | | deps | - | List of labels | optional | [] | | embed | - | List of labels | optional | [] | | gc_goopts | - | List of strings | optional | [] | | srcs | - | List of labels | optional | [] | ## go_tool_library
go_tool_library(name, data, deps, embed, gc_goopts, importmap, importpath, srcs, x_defs)**ATTRIBUTES** | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | data | - | List of labels | optional | [] | | deps | - | List of labels | optional | [] | | embed | - | List of labels | optional | [] | | gc_goopts | - | List of strings | optional | [] | | importmap | - | String | optional | "" | | importpath | - | String | optional | "" | | srcs | - | List of labels | optional | [] | | x_defs | - | Dictionary: String -> String | optional | {} | ## go_toolchain
go_toolchain(name, builder, cgo_link_flags, goarch, goos, link_flags, sdk)Defines a Go toolchain based on an SDK **ATTRIBUTES** | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | builder | Tool used to execute most Go actions | Label | required | | | cgo_link_flags | Flags passed to the external linker (if it is used) | List of strings | optional | [] | | goarch | Default target architecture | String | required | | | goos | Default target OS | String | required | | | link_flags | Flags passed to the Go internal linker | List of strings | optional | [] | | sdk | The SDK this toolchain is based on | Label | required | | ## GoArchive
GoArchive()**FIELDS** ## GoArchiveData
GoArchiveData()**FIELDS** ## GoLibrary
GoLibrary()**FIELDS** ## GoPath
GoPath()**FIELDS** ## GoSDK
GoSDK(goos, goarch, root_file, libs, headers, srcs, package_list, tools, go)Contains information about the Go SDK used in the toolchain **FIELDS** | Name | Description | | :------------- | :------------- | | goos | The host OS the SDK was built for. | | goarch | The host architecture the SDK was built for. | | root_file | A file in the SDK root directory | | libs | List of pre-compiled .a files for the standard library built for the execution platform. | | headers | List of .h files from pkg/include that may be included in assembly sources. | | srcs | List of source files for importable packages in the standard library. Internal, vendored, and tool packages may not be included. | | package_list | A file containing a list of importable packages in the standard library. | | tools | List of executable files in the SDK built for the execution platform, excluding the go binary file | | go | The go binary file | ## GoSource
GoSource()**FIELDS** ## declare_toolchains
declare_toolchains(host, sdk, builder)Declares go_toolchain and toolchain targets for each platform. **PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | host |
-
| none | | sdk |-
| none | | builder |-
| none | ## go_binarygo_binary(name, kwargs)See go/core.rst#go_binary for full documentation. **PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | name |
-
| none | | kwargs |-
| none | ## go_contextgo_context(ctx, attr)Returns an API used to build Go code. See /go/toolchains.rst#go-context **PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | ctx |
-
| none | | attr |-
|None
|
## go_download_sdk
go_download_sdk(kwargs)**PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | kwargs |
-
| none | ## go_host_sdkgo_host_sdk(kwargs)**PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | kwargs |
-
| none | ## go_librarygo_library(name, kwargs)See go/core.rst#go_library for full documentation. **PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | name |
-
| none | | kwargs |-
| none | ## go_local_sdkgo_local_sdk(kwargs)**PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | kwargs |
-
| none | ## go_register_toolchainsgo_register_toolchains(kwargs)**PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | kwargs |
-
| none | ## go_rulego_rule(kwargs)**PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | kwargs |
-
| none | ## go_rules_dependenciesgo_rules_dependencies()**PARAMETERS** ## go_test
go_test(name, kwargs)See go/core.rst#go_test for full documentation. **PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | name |
-
| none | | kwargs |-
| none | ## go_vet_testgo_vet_test(args, kwargs)**PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | args |
-
| none | | kwargs |-
| none | ## go_wrap_sdkgo_wrap_sdk(kwargs)**PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | kwargs |
-
| none | ## nogonogo(kwargs)**PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | kwargs |
-
| none |