Documentation
¶
Index ¶
- func CastTo(target interface{}, source interface{}) bool
- func GetAbsPathFromCaller(skip int) (string, error)
- func In[T comparable](value T, list ...T) bool
- func IsNil(i interface{}) bool
- func NewFrom(in interface{}) (out interface{}, err error)
- func ReplaceAllEmptySpace(s string) string
- func StringStartsWith(s string, prefixes ...string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CastTo ¶
func CastTo(target interface{}, source interface{}) bool
CastTo casting a value to another target, it basically share the same value or uses the same address. A target must be a pointer to be able to receive the value from the source.
func GetAbsPathFromCaller ¶ added in v0.3.1
GetAbsPathFromCaller returns the absolute path of the file that calls this function.
func In ¶
func In[T comparable](value T, list ...T) bool
In returns true if a given value exists in the list.
func NewFrom ¶
func NewFrom(in interface{}) (out interface{}, err error)
NewFrom dynamically creates a new variable from the specified data type. However, the returned Value's Type is always a PointerTo{dataType}.
func ReplaceAllEmptySpace ¶
ReplaceAllEmptySpace replaces all empty space as well as reserved escape characters such as tab, newline, carriage return, and so forth.
func StringStartsWith ¶ added in v0.4.0
StringStartsWith checks if a string starts with any of the prefixes.
Types ¶
This section is empty.