system

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureFolder

func EnsureFolder(root string) string

EnsureFolder EnsureFolder

func FileExists

func FileExists(filename string) bool

FileExists FileExists

func GetEnvOrDefault

func GetEnvOrDefault(key string, defaultValue string) string

GetEnvOrDefault

func GetSysmemory

func GetSysmemory() float64

func ReadBuffer added in v0.23.6

func ReadBuffer(file string) (data *bytes.Buffer, err error)

Load data from file to buffer via io.Copy (more efficient). Output can be converted to string or bytes.

data.String() // for writing SQL etc.
data.Bytes()  // for JSON unmarshaling

func Wait added in v0.25.8

func Wait(t1, t2 int)

Random wait period between t1...t2 milliseconds

Types

This section is empty.

Jump to

Keyboard shortcuts

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