os

package
v0.7.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBoolEnv

func GetBoolEnv(name string, def bool) bool

GetBoolEnv get evironment value of 'name', and return provided default value if not found.

func GetFloat64Env

func GetFloat64Env(name string, def float64) float64

GetFloat64Env get evironment value of 'name', and return provided default value if not found.

func GetHomeDir

func GetHomeDir() string

GetHomeDir gets current user's home directory.

func GetIntEnv

func GetIntEnv(name string, def int) int

GetIntEnv get evironment value of 'name', and return provided default value if not found.

func GetStringEnv

func GetStringEnv(name, def string) string

GetStringEnv get evironment value of 'name', and return provided default value if not found.

func IsFileExists

func IsFileExists(fileName string) bool

IsFileExists returns true if the file exists.

func OpenFile

func OpenFile(fileName string, flag int, perm os.FileMode) (*os.File, error)

OpenFile opens file from 'name', and create one if not exist.

func ReplaceFile

func ReplaceFile(destPath string, content io.Reader) error

ReplaceFile replace file with content in destPath

Types

This section is empty.

Jump to

Keyboard shortcuts

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