toolenv

package
v0.0.237 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package toolenv resolves and persists the compiler's user settings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPath

func ConfigPath() (string, error)

ConfigPath is the per-user settings file. Reading settings never creates it.

func Names

func Names() []string

Names is the complete set of supported user settings, in display order.

func Update

func Update(assignments, unset []string) error

Update validates every requested edit before atomically replacing the file. Unknown saved keys are retained for compatibility with newer compilers.

func Value

func Value(name string) (string, error)

Types

type Setting

type Setting struct {
	Value  string `json:"value"`
	Source string `json:"source"`
}

Setting includes the origin of an effective value.

func Lookup

func Lookup(name string) (Setting, error)

Lookup resolves environment, then saved settings, then the platform default. Empty values select the next source. Explicit values are never relocated.

Jump to

Keyboard shortcuts

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