Content-Length: 65319 | pFad | http://go.dev/cmd/go/internal/envcmd@go1.23.5

2592000 envcmd package - cmd/go/internal/envcmd - Go Packages

envcmd

package standard library
go1.23.5 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Overview

Package envcmd implements the “go env” command.

Index

Constants

This section is empty.

Variables

View Source
var CmdEnv = &base.Command{
	UsageLine: "go env [-json] [-changed] [-u] [-w] [var ...]",
	Short:     "print Go environment information",
	Long: `
Env prints Go environment information.

By default env prints information as a shell script
(on Windows, a batch file). If one or more variable
names is given as arguments, env prints the value of
each named variable on its own line.

The -json flag prints the environment in JSON format
instead of as a shell script.

The -u flag requires one or more arguments and unsets
the default setting for the named environment variables,
if one has been set with 'go env -w'.

The -w flag requires one or more arguments of the
form NAME=VALUE and changes the default settings
of the named environment variables to the given values.

The -changed flag prints only those settings whose effective
value differs from the default value that would be obtained in
an empty environment with no prior uses of the -w flag.

For more about environment variables, see 'go help environment'.
	`,
}

Functions

func ExtraEnvVars

func ExtraEnvVars() []cfg.EnvVar

ExtraEnvVars returns environment variables that should not leak into child processes.

func ExtraEnvVarsCostly added in go1.11

func ExtraEnvVarsCostly() []cfg.EnvVar

ExtraEnvVarsCostly returns environment variables that should not leak into child processes but are costly to evaluate.

func MkEnv

func MkEnv() []cfg.EnvVar

func PrintEnv added in go1.17

func PrintEnv(w io.Writer, env []cfg.EnvVar, onlyChanged bool)

PrintEnv prints the environment variables to w.

Types

This section is empty.

Jump to

Keyboard shortcuts

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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://go.dev/cmd/go/internal/envcmd@go1.23.5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy