blob: 752347ecf0c317978bd04edd02f23329457d92d3 [file] [log] [blame]
#!/bin/bash
# Copyright 2021 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#### CATEGORY=Build
### Manage Go source code
## usage: fx go [SUBCOMMAND] [ARGS...]
##
## Entrypoint to Fuchsia's Go toolchain.
##
## Run `fx go help` to see all subcommands and flags.
set -euo pipefail
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/vars.sh
function main {
export GOROOT="${PREBUILT_GO_DIR}"
exec "${PREBUILT_GO_DIR}/bin/go" "$@"
}
main "$@"