Documentation ¶
Index ¶
- Constants
- func CountSpaceInStringPrefix(str string) int
- func ErrorExit(msg string, code ...int) int
- func Exit(code ...int) int
- func ExitByError(err error, code ...int) int
- func ExitByErrorMsg(msg string, code ...int) int
- func Filter[E any](src []E, callback func(E) bool) []E
- func FormatTextToWidth(text string, width int) string
- func FormatTextToWidthAndPrefix(text string, prefixWidth int, overallWidth int) string
- func GetArgs0() string
- func GetArgs0Name() string
- func GetCallingFunctionInfo(skip int) (string, string, string, int)
- func GetGoVersion() (int64, int64, int64, error)
- func GetGoVersionMajor() (int64, error)
- func GetGoVersionMajorMust() int64
- func GetGoVersionMinor() (int64, error)
- func GetGoVersionMinorMust() int64
- func GetGoVersionPatch() (int64, error)
- func GetGoVersionPatchMust() int64
- func GetSQLNullString(s sql.NullString) string
- func GetSQLNullTimeUnix(s sql.NullTime) int64
- func HasInvisibleByteSlice(data []byte) bool
- func HasInvisibleString(str string) bool
- func HasUTF8BOM(data []byte) bool
- func HttpStatusOK(status int) bool
- func InvalidPhone(phone string) bool
- func IsDir(path string) bool
- func IsExists(path string) bool
- func IsUTF8(b []byte) bool
- func IsUTF8String(s string) bool
- func IsValidDomain(domain string) bool
- func IsValidEmail(email string) bool
- func IsValidIPv4CIDR(cidr string) bool
- func IsValidIPv6CIDR(cidr string) bool
- func IsValidURLPath(path string) bool
- func MakeDir(path string) error
- func ProcessPath(path string, defaultUrl ...string) string
- func Rand() *rand.Rand
- func RandStr(length int) string
- func RemoveBOMIfExists(data []byte) []byte
- func Restart(newArgs ...string) (*os.Process, error)
- func SHA256(data []byte) string
- func SayGoodByef(format string, args ...interface{})
- func SayHellof(format string, args ...interface{})
- func SqlTimeNow() sql.NullTime
- func SqlTimeNull() sql.NullTime
- func ValidIPv4(ipString string) bool
- func ValidIPv6(ipString string) bool
- type StringBool
- func (s *StringBool) IsDisable() bool
- func (s *StringBool) IsEnable() bool
- func (s *StringBool) SetDefaultDisable()
- func (s *StringBool) SetDefaultEanble()
- func (s *StringBool) ToBool(defaultVal ...bool) (res bool)
- func (s *StringBool) ToString() string
- func (s *StringBool) ToStringDefaultDisable() string
- func (s *StringBool) ToStringDefaultEnable() string
Constants ¶
View Source
const BASE_CHAR = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
View Source
const NormalConsoleWidth = 80
Variables ¶
This section is empty.
Functions ¶
func ExitByError ¶
func ExitByErrorMsg ¶
func FormatTextToWidth ¶
func GetArgs0Name ¶
func GetArgs0Name() string
func GetGoVersionMajor ¶
func GetGoVersionMajorMust ¶
func GetGoVersionMajorMust() int64
func GetGoVersionMinor ¶
func GetGoVersionMinorMust ¶
func GetGoVersionMinorMust() int64
func GetGoVersionPatch ¶
func GetGoVersionPatchMust ¶
func GetGoVersionPatchMust() int64
func GetSQLNullString ¶
func GetSQLNullString(s sql.NullString) string
func GetSQLNullTimeUnix ¶
func HasInvisibleByteSlice ¶
func HasInvisibleString ¶
func HasUTF8BOM ¶
func HttpStatusOK ¶
func InvalidPhone ¶
func IsUTF8String ¶
func IsValidDomain ¶
func IsValidEmail ¶
func IsValidIPv4CIDR ¶
func IsValidIPv6CIDR ¶
IsValidIPv6CIDR checks if the given string is a valid IPv6 CIDR notation.
func IsValidURLPath ¶
func ProcessPath ¶
func RemoveBOMIfExists ¶
func SayGoodByef ¶
func SayGoodByef(format string, args ...interface{})
func SqlTimeNow ¶
func SqlTimeNull ¶
Types ¶
type StringBool ¶
type StringBool string
func (*StringBool) IsDisable ¶
func (s *StringBool) IsDisable() bool
func (*StringBool) IsEnable ¶
func (s *StringBool) IsEnable() bool
func (*StringBool) SetDefaultDisable ¶
func (s *StringBool) SetDefaultDisable()
func (*StringBool) SetDefaultEanble ¶
func (s *StringBool) SetDefaultEanble()
func (*StringBool) ToBool ¶
func (s *StringBool) ToBool(defaultVal ...bool) (res bool)
func (*StringBool) ToString ¶
func (s *StringBool) ToString() string
func (*StringBool) ToStringDefaultDisable ¶
func (s *StringBool) ToStringDefaultDisable() string
func (*StringBool) ToStringDefaultEnable ¶
func (s *StringBool) ToStringDefaultEnable() string
Click to show internal directories.
Click to hide internal directories.