Documentation
¶
Index ¶
- func BoolOrPanic(res bool, err error) bool
- func ClearDirectory(dir string) error
- func CreateDirectory(path string) error
- func ExtractNumbers(str string) string
- func FileExists(path string) (bool, error)
- func FindFile(dir string, pattern string) []string
- func Float32OrPanic(res float32, err error) float32
- func Float64OrPanic(res float64, err error) float64
- func GetSubDirectory(dir string) ([]string, error)
- func HasError(err error) bool
- func Int16OrPanic(res int16, err error) int16
- func Int32OrPanic(res int32, err error) int32
- func Int64OrPanic(res int64, err error) int64
- func Int8OrPanic(res int8, err error) int8
- func IntOrPanic(res int, err error) int
- func InterfaceOrPanic(res interface{}, err error) interface{}
- func IsDirectory(path string) (bool, error)
- func JalaliToTime(jd string) *time.Time
- func PanicOnError(err error)
- func RandomString(n uint) (string, error)
- func RandomStringFromCharset(n uint, letters string) (res string, err error)
- func StringOrPanic(res string, err error) string
- func TimeToJalali(t time.Time) (ptime.Time, error)
- func UInt16OrPanic(res uint16, err error) uint16
- func UInt32OrPanic(res uint32, err error) uint32
- func UInt64OrPanic(res uint64, err error) uint64
- func UInt8OrPanic(res uint8, err error) uint8
- func UIntOrPanic(res uint, err error) uint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolOrPanic ¶
BoolOrPanic get function result (bool, error) if error is not null generate panic otherwise return result
func ClearDirectory ¶
ClearDirectory delete all files and sub-directory in directory
func CreateDirectory ¶
CreateDirectory create nested directory
func ExtractNumbers ¶
ExtractNumbers extract numbers from string
func Float32OrPanic ¶
Float32OrPanic get function result (float32, error) if error is not null generate panic otherwise return result
func Float64OrPanic ¶
Float64OrPanic get function result (float64, error) if error is not null generate panic otherwise return result
func GetSubDirectory ¶
GetSubDirectory get list of sub directories
func Int16OrPanic ¶
Int16OrPanic get function result (int16, error) if error is not null generate panic otherwise return result
func Int32OrPanic ¶
Int32OrPanic get function result (int32, error) if error is not null generate panic otherwise return result
func Int64OrPanic ¶
Int64OrPanic get function result (int64, error) if error is not null generate panic otherwise return result
func Int8OrPanic ¶
Int8OrPanic get function result (int8, error) if error is not null generate panic otherwise return result
func IntOrPanic ¶
IntOrPanic get function result (int, error) if error is not null generate panic otherwise return result
func InterfaceOrPanic ¶
func InterfaceOrPanic(res interface{}, err error) interface{}
InterfaceOrPanic get function result (interface{}, error) if error is not null generate panic otherwise return result
func IsDirectory ¶
IsDirectory check if path is directory
func JalaliToTime ¶
JalaliToTime convert jalali date string to time from 2006-01-02 15:04:05 format
this function returns nil on invalid date
func RandomString ¶
RandomString generate random string from Alpha-Num Chars
func RandomStringFromCharset ¶
RandomStringFromCharset generate random string from character list
func StringOrPanic ¶
StringOrPanic get function result (string, error) if error is not null generate panic otherwise return result
func TimeToJalali ¶
TimeToJalali convert time to jalali date
func UInt16OrPanic ¶
UInt16OrPanic get function result (uint16, error) if error is not null generate panic otherwise return result
func UInt32OrPanic ¶
UInt32OrPanic get function result (uint32, error) if error is not null generate panic otherwise return result
func UInt64OrPanic ¶
UInt64OrPanic get function result (uint64, error) if error is not null generate panic otherwise return result
func UInt8OrPanic ¶
UInt8OrPanic get function result (uint8, error) if error is not null generate panic otherwise return result
func UIntOrPanic ¶
UIntOrPanic get function result (uint, error) if error is not null generate panic otherwise return result
Types ¶
This section is empty.