tree: 7696666dd4d53ffa30b66c14beeca4caf67d3104 [path history] [tgz]
  1. chromiumos/

platform/dev golang development

Outside chroot w/ VSCode

For lightweight development outside of the chroot, run the following:

Setup the chroot go build env/deps, which is what will be present when building/running through cros_sdk:

cros_workon --host start test-server
sudo emerge test-server

Add the following to your ~/.bashrc:

# Enable building go modules from your $GOPATH
# Details: ttps://
go env -w  GO111MODULE=auto

# Setup local go dir where binaries are installed
mkdir -p ~/go
export GOPATH=$HOME/go

# Set your GOPATH to find this code
export GOPATH=${GOPATH}:$HOME/chromiumos/src/platform/dev

# Set your GOPATH to all of the deps that will be present
# when building/running from the chroot/portage
export GOPATH=${GOPATH}:${CHROMEOS_SRC}/chroot/usr/lib/gopath

# Add Tast repos to GOPATH
export GOPATH=${GOPATH}:$HOME/chromiumos/src/platform/tast-tests
export GOPATH=${GOPATH}:$HOME/chromiumos/src/platform/tast

Then launch VS Code:

cd ~/chromiumos/src/platform
code dev