src/

directory
v0.0.0-...-49c4e59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2026 License: BSD-3-Clause

README

platform/dev golang development

[TOC]

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_sdk
cros_workon --host start test-services
sudo emerge test-services

Add the following to your ~/.bashrc:

# Enable building go modules from your $GOPATH
# Details: ttps://blog.golang.org/go116-module-changes
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
CHROMEOS_SRC=~/chromiumos
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

Directories

Path Synopsis
chromiumos
ctp module
go.chromium.org
chromiumos/build/cmd/metadataserver command
Package main starts the MetadataService grpc server
Package main starts the MetadataService grpc server
chromiumos/lroold
Package lro provides a universal implementation of longrunning.OperationsServer, and helper functions for dealing with long-running operations.
Package lro provides a universal implementation of longrunning.OperationsServer, and helper functions for dealing with long-running operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL