os

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ShutdownSignals = []os.Signal{syscall.SIGINT, syscall.SIGTERM}

CTRL + C for SIGINT docker stop for SIGTERM

Functions

func GetEnvAsFloat64OrFallback

func GetEnvAsFloat64OrFallback(key string, defaultValue float64) (float64, error)

GetEnvAsFloat64OrFallback returns the env variable (parsed as float64) for the given key and falls back to the given defaultValue if not set

func GetEnvAsIntOrFallback

func GetEnvAsIntOrFallback(key string, defaultValue int) (int, error)

GetEnvAsIntOrFallback returns the env variable (parsed as integer) for the given key and falls back to the given defaultValue if not set

func GetEnvAsStringOrFallback

func GetEnvAsStringOrFallback(key, defaultValue string) string

GetEnvAsStringOrFallback returns the env variable for the given key and falls back to the given defaultValue if not set

func GetPidsByName added in v0.0.5

func GetPidsByName(
	timeout time.Duration,
	name string) ([]int, string, error)

func Getwd

func Getwd() (string, error)

func MakeDir

func MakeDir(name string) error

func MakeDirAll

func MakeDirAll(name string) error

MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. The permission(0755) bits perm (before umask) are used for all directories that MkdirAll creates. If path is already a directory, MkdirAll does nothing

func OpenAll

func OpenAll(path string, flag int, perm os.FileMode) (*os.File, error)

func OpenFile

func OpenFile(path string, appended bool) (file *os.File, err error)

func PathExists

func PathExists(path string) (bool, error)

func SameFile

func SameFile(fi1, fi2 string) bool

SameFile reports whether fi1 and fi2 describe the same file.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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