vos

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvVarNames

func GetEnvVarNames() string

Types

type LocalSystem

type LocalSystem struct {

	// exit call back
	Exitf func(int)
	// contains filtered or unexported fields
}

func NewLocalSystem

func NewLocalSystem(ws vfs.Workspace) (*LocalSystem, error)

func (*LocalSystem) Chdir

func (s *LocalSystem) Chdir(path string) error

func (*LocalSystem) Command

func (s *LocalSystem) Command(name string, arg ...string) *exec.Cmd

func (*LocalSystem) Env added in v0.0.3

func (s *LocalSystem) Env() []string

Env returns all environment variables as a name=value list. It converts complex and nested data structures into a JSON string representation when necessary. For basic types such as strings, integers, floats, and booleans, a direct conversion to a string format is applied.

func (*LocalSystem) Environ

func (s *LocalSystem) Environ() map[string]any

Return all environment variables as a map.

func (*LocalSystem) Exit

func (s *LocalSystem) Exit(code int)

func (*LocalSystem) Getenv

func (s *LocalSystem) Getenv(key string) any

func (*LocalSystem) Getwd

func (s *LocalSystem) Getwd() (string, error)

func (*LocalSystem) Setenv

func (s *LocalSystem) Setenv(key string, value any)

type System

type System interface {
	Command(name string, arg ...string) *exec.Cmd
	Chdir(dir string) error
	Getwd() (string, error)
	Env() []string
	Environ() map[string]any
	Getenv(string) any
	Setenv(string, any)
	Exit(int)
}

Jump to

Keyboard shortcuts

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