utils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolP

func BoolP(value bool) *bool

BoolP returns a pointer of a boolean variable

func Deref

func Deref[T any](s *T) T

func ExecCommand

func ExecCommand(dir string, command string, args ...string) error

ExecCommand executes command in the specified directory

func Int32P

func Int32P(value int32) *int32

Int32P returns a pointer of an int32 variable

func Int64P

func Int64P(value int64) *int64

Int64P returns a pointer of an int64 variable

func IntP

func IntP(value int) *int

IntP returns a pointer of an integer variable

func MkdirIfNotExist

func MkdirIfNotExist(dir string) error

func NewMultiError

func NewMultiError(title string, errs ...error) error

func PBool

func PBool(value *bool) bool

PBool returns a boolean value from a pointer

func PInt

func PInt(value *int) int

PInt returns an integer value from a pointer

func PInt32

func PInt32(value *int32) int32

PInt32 returns an int32 value from a pointer

func PInt64

func PInt64(value *int64) int64

PInt64 returns an int64 value from a pointer

func PString

func PString(value *string) string

PString returns a string value from a pointer

func RemoveFromDirByPatterns

func RemoveFromDirByPatterns(patterns ...string) error

RemoveFromDirByPatterns removes files and dirs from the specified directory by pattern eg

./*/dir1/*_qwe.go
./dir1/*_dir2

func StringP

func StringP(value string) *string

StringP returns a pointer of a string variable

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