Documentation
¶
Index ¶
- Constants
- func CaptureStackTrace() string
- func CloseSafe[T any](ch chan T)
- func GetVersion() string
- func Hostname() string
- func J(states []string) string
- func Jw(states []string, sep string) string
- func P(txt string, args ...any)
- func PadString(str string, length int, pad string) string
- func RandId(strLen int) string
- func SlicesEvery[S1 ~[]E, S2 ~[]E, E comparable](col1 S1, col2 S2) bool
- func SlicesNone[S1 ~[]E, S2 ~[]E, E comparable](col1 S1, col2 S2) bool
- func SlicesUniq[S ~[]E, E comparable](coll S) S
- func SlicesWithout[S ~[]E, E comparable](coll S, el E) S
- func Sp(txt string, args ...any) string
- func StructFields(input interface{}) ([]string, error)
- func TruncateStr(s string, maxLength int) string
Constants ¶
View Source
const EnvAmHostname = "AM_HOSTNAME"
EnvAmHostname will override the hostname in all machine names.
Variables ¶
This section is empty.
Functions ¶
func CaptureStackTrace ¶ added in v0.17.0
func CaptureStackTrace() string
func CloseSafe ¶ added in v0.10.1
func CloseSafe[T any](ch chan T)
TODO remove if that speeds things up
func GetVersion ¶
func GetVersion() string
func SlicesEvery ¶ added in v0.10.1
func SlicesEvery[S1 ~[]E, S2 ~[]E, E comparable](col1 S1, col2 S2) bool
SlicesEvery returns true if all elements of coll2 are in coll1.
func SlicesNone ¶ added in v0.10.1
func SlicesNone[S1 ~[]E, S2 ~[]E, E comparable](col1 S1, col2 S2) bool
SlicesNone returns true if none of the elements of coll2 are in coll1.
func SlicesUniq ¶ added in v0.10.1
func SlicesUniq[S ~[]E, E comparable](coll S) S
func SlicesWithout ¶ added in v0.10.1
func SlicesWithout[S ~[]E, E comparable](coll S, el E) S
func StructFields ¶ added in v0.17.1
func TruncateStr ¶ added in v0.17.0
TruncateStr with shorten the string and leave a tripedot suffix.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.