vos

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: MIT Imports: 4 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 {
}

func NewLocalSystem

func NewLocalSystem() *LocalSystem

func (*LocalSystem) Chdir

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

func (*LocalSystem) Command

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

func (*LocalSystem) Environ

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

func (*LocalSystem) Exit

func (s *LocalSystem) Exit(code int)

func (*LocalSystem) Getenv

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

func (*LocalSystem) Getwd

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

func (*LocalSystem) Setenv

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

type System

type System interface {
	Command(name string, arg ...string) *exec.Cmd

	Chdir(dir string) error
	Getwd() (string, error)

	Environ() []string
	Getenv(string) string
	Setenv(string, string)

	Exit(int)
}

System represents the virtual operating system for the tool. It provides the system operations that can be mocked for testing.

Jump to

Keyboard shortcuts

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