package utils

Import Path
	/internal/utils (on go.dev)

Dependency Relation
	imports 21 packages, and imported by 17 packages

Involved Source Files utils.go wsconn.go
Package-Level Functions (total 18)
Type Parameters: T: any TODO remove if that speeds things up
DialWebSocket dials a WebSocket endpoint and returns a net.Conn carrying binary messages as a byte stream. Useful for tunneling stream protocols.
J joins state names into a single string
Jw joins state names into a single string with a separator.
NewServerWSConn wraps an already upgraded server-side WebSocket into a net.Conn.
func P(txt string, args ...any)
func PadString(str string, length int, pad string) string
RandId generates a random ID of the given length (defaults to 8).
Type Parameters: S1: ~[]E S2: ~[]E E: comparable SlicesEvery returns true if all elements of coll2 are in coll1.
Type Parameters: S1: ~[]E S2: ~[]E E: comparable SlicesNone returns true if none of the elements of coll2 are in coll1.
Type Parameters: S: ~[]E E: comparable
Type Parameters: S: ~[]E E: comparable
func Sp(txt string, args ...any) string
TruncateStr with shorten the string and leave a tripedot suffix.
Package-Level Variables (only one)
Fmt is a printer for large numbers
Package-Level Constants (only one)
EnvAmHostname will override the hostname in all machine names.