Documentation
¶
Index ¶
- Variables
- func BaseName(path string) string
- func CompatibleType(v reflect.Value, t reflect.Type) bool
- func ExecutableDir() (string, error)
- func FormatPublicType(name string) string
- func GetStructTag(f reflect.StructField, tagName string) string
- func GetSystemDirectory() (string, error)
- func IsImplicitRelativePath(path string) bool
- func PathsFromEnvironmentVariable(env string) []string
- func PathsFromFileLines(file string) (ret []string)
- func Set(v reflect.Value, obj any)
- func StringToUintPtr(s string) uintptr
- func UintPtrToString(ptr uintptr) string
Constants ¶
This section is empty.
Variables ¶
View Source
var HostByteOrder binary.ByteOrder
HostByteOrder is the native byte order of the local CPU. Value is determined at run time.
View Source
var NetworkByteOrder binary.ByteOrder = binary.BigEndian
NetworkByteOrder is the byte order used on networks, defined by RFC1700
Functions ¶
func ExecutableDir ¶
ExecutableDir returns the directory containing current executable.
func FormatPublicType ¶
FormatPublicType returns a human-readable Golang public type name from an arbitrary non-empty string.
func GetStructTag ¶ added in v1.3.0
func GetStructTag(f reflect.StructField, tagName string) string
GetStructTag returns the value of a named tag of a struct member
func GetSystemDirectory ¶
GetSystemDirectory is not implemented on non-Windows OSes and always returns an error.
func IsImplicitRelativePath ¶
IsImplicitRelativePath tests if the path only contains a file name.
func PathsFromEnvironmentVariable ¶ added in v1.3.0
func PathsFromFileLines ¶ added in v1.3.0
func StringToUintPtr ¶ added in v1.3.0
func UintPtrToString ¶
UintPtrToString converts a zero-terminated raw "const char *" to a Go string. Example:
var str := utils.UintPtrToString(uintptr(unsafe.Pointer(uint16ptr_variable)))
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.