os

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Package os contains some utility functions as well as pointers to os package functions so as to help in unit testing (mocking).

Index

Constants

This section is empty.

Variables

View Source
var (
	// OsOpenFile is a pointer to os.OpenFile
	OsOpenFile = os.OpenFile

	// OsRemove is a pointer to os.RemoveAll
	OsRemoveAll = os.RemoveAll

	// OsMkdirAll is a pointer to os.MkdirAll
	OsMkdirAll = os.MkdirAll

	// OsEnviron is a pointer to os.Environ
	OsEnviron = os.Environ
)

os package related functions.

View Source
var ExecCommand = exec.Command

ExecCommand a pointer to exec.Command

Functions

func EnvMap added in v1.0.4

func EnvMap() map[string]string

EnvMap returns OS environment variable values in a map. Any ENV variables set after this program is started (or func is called first time) would not be part of the map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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