env

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IManager

type IManager interface {
	// AppendEnv 向环境变量中追加一个值
	AppendEnv(key, value string) error
	// RemoveEnv 从环境变量中移除一个值
	RemoveEnv(key, value string) error
	// GetEnv 获取环境变量的值
	GetEnv(key string) (string, error)
	// SetEnv 设置环境变量的值
	SetEnv(key, value string) error
	// DeleteEnv 删除环境变量
	DeleteEnv(key string) error
}

type KV

type KV struct {
	Key    string
	Value  string
	Append bool
}

type Manager

type Manager struct {
}

func NewEnvManager

func NewEnvManager() *Manager

func (*Manager) AppendEnv

func (m *Manager) AppendEnv(key, value string) error

func (*Manager) DeleteEnv

func (m *Manager) DeleteEnv(key string) error

func (*Manager) GetEnv

func (m *Manager) GetEnv(key string) (string, error)

func (*Manager) RemoveEnv

func (m *Manager) RemoveEnv(key, value string) error

func (*Manager) SetEnv

func (m *Manager) SetEnv(key, value string) error

type ShellType

type ShellType string
const (
	ShellTypeBash ShellType = "bash"
	ShellTypeZsh  ShellType = "zsh"
	ShellTypeFish ShellType = "fish"
)

Jump to

Keyboard shortcuts

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