utils

package module
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: Apache-2.0 Imports: 10 Imported by: 4

README

utils

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirectory

func CreateDirectory(path string, perm fs.FileMode) (string, error)

func CreateDirectoryFromFile

func CreateDirectoryFromFile(path string, perm fs.FileMode) (string, error)

func CreateFile

func CreateFile(path string, flags int, dirMode, mode fs.FileMode) (file *os.File, err error)

func CreateLogFile

func CreateLogFile(path string) (file *os.File, err error)

func FileExists

func FileExists(path string) bool

func GetAbsolutePath

func GetAbsolutePath(path string) (string, error)

func GetLocalIP added in v2.1.0

func GetLocalIP() string

func Getenv

func Getenv(env string, def ...string) string

func IsInt

func IsInt(s string) bool

func IsSuccess

func IsSuccess(status int) bool

func RandomString

func RandomString(n int32) string

func UnsafeBytes

func UnsafeBytes(s string) (bs []byte)

#nosec G103 UnsafeBytes returns a byte pointer without allocation

func UnsafeString

func UnsafeString(b []byte) string

#nosec G103 UnsafeString returns a string pointer without allocation

Types

This section is empty.

Jump to

Keyboard shortcuts

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