testhome

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package testhome gives a test a home folder of its own, so that it never reads or writes the user's dev.yaml or the state of their aicoded dev. Go keeps its caches and settings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DevYAML

func DevYAML(t testing.TB, home, content string)

DevYAML writes content as the dev.yaml of home, a folder Set returned.

func Set

func Set(t testing.TB) string

Set points HOME and XDG_CONFIG_HOME at a new temp folder, removed when the test ends, and returns it. The folder's path is short, so the Unix sockets of aicoded dev fit below it. It first pins GOCACHE, GOPATH, GOMODCACHE and GOENV to where they are now, so the go command still finds its build cache and modules without the network.

Types

This section is empty.

Jump to

Keyboard shortcuts

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